Skip to content

Commit b34f0c3

Browse files
committed
feat(serverHandler/upload): restrict upload form name scope
Previously, if form name is not `dirfile` or `innerdirfile`, assume form name is `dir` and skip checking the name provided. Now if provided name is unrecognized, just ignore the whole form part and will not write its content to file.
1 parent 3b2c58a commit b34f0c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/serverHandler/upload.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ func (h *handler) saveUploadFiles(fsPrefix string, createDir, overwriteExists bo
8585
if prefixSlashIndex > 0 {
8686
fsInfix = filepath[prefixSlashIndex+1:]
8787
}
88+
} else if formname != file {
89+
continue
8890
}
8991

9092
filePrefix := fsPrefix

0 commit comments

Comments
 (0)