mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-17 16:36:49 +00:00
fix(tus): reject negative upload-length to prevent inconsistent cache entry (#5876)
This commit is contained in:
parent
0f39bd055e
commit
7a16129bfc
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue