diff --git a/http/tus_handlers.go b/http/tus_handlers.go index 0b7bcbb4..31245a34 100644 --- a/http/tus_handlers.go +++ b/http/tus_handlers.go @@ -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) }