Skip to content

Commit 9fc3f99

Browse files
committed
Change two errors into warnings
1 parent c977fbb commit 9fc3f99

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lua/upload/upload.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func uploadedFileSave(L *lua.LState) int {
214214
absBase, _ := filepath.Abs(ulf.scriptdir)
215215
absTarget, _ := filepath.Abs(writeFilename)
216216
if !strings.HasPrefix(absTarget, absBase+string(os.PathSeparator)) && absTarget != absBase {
217-
logrus.Error("path traversal attempt blocked: ", writeFilename)
217+
logrus.Warn("path traversal attempt blocked: ", writeFilename)
218218
L.Push(lua.LBool(false))
219219
return 1
220220
}
@@ -250,7 +250,7 @@ func uploadedFileSaveIn(L *lua.LState) int {
250250
absBase, _ := filepath.Abs(baseDir)
251251
absTarget, _ := filepath.Abs(writeFilename)
252252
if !strings.HasPrefix(absTarget, absBase+string(os.PathSeparator)) && absTarget != absBase {
253-
logrus.Error("path traversal attempt blocked: ", writeFilename)
253+
logrus.Warn("path traversal attempt blocked: ", writeFilename)
254254
L.Push(lua.LBool(false))
255255
return 1
256256
}

0 commit comments

Comments
 (0)