mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-04-09 12:16:17 +00:00
fix(tus): reject negative upload-length to prevent inconsistent cache entry (#5876)
This commit is contained in:
@@ -105,7 +105,7 @@ func tusPostHandler(cache UploadCache) handleFunc {
|
||||
}
|
||||
|
||||
uploadLength, err := getUploadLength(r)
|
||||
if err != nil {
|
||||
if err != nil || uploadLength < 0 {
|
||||
return http.StatusBadRequest, fmt.Errorf("invalid upload length: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user