fix(tus): reject negative upload-length to prevent inconsistent cache entry (#5876)
This commit is contained in:
1 parent
0f39bd055e
commit
7a16129bfc
1 file changed
+1
-1
@@ -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