Skip to content

Commit

Permalink
fix: Sanitize filename during chunk upload
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Jul 18, 2022
1 parent 5038a89 commit 226e869
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/crud/upload_chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ func (a App) mergeChunk(w http.ResponseWriter, r *http.Request, request provider
return
}

fileName, err = provider.SanitizeName(fileName, true)
if err != nil {
a.error(w, r, request, model.WrapInternal(err))
return
}
filePath := request.SubPath(fileName)
err = provider.WriteToStorage(r.Context(), a.storageApp, filePath, size, file)

Expand Down

0 comments on commit 226e869

Please sign in to comment.