diff --git a/pkg/loghttp/params.go b/pkg/loghttp/params.go index 1244a7a623686..7649a27804726 100644 --- a/pkg/loghttp/params.go +++ b/pkg/loghttp/params.go @@ -26,6 +26,9 @@ func limit(r *http.Request) (uint32, error) { if err != nil { return 0, err } + if l <= 0 { + return 0, errors.New("limit must be a positive value") + } return uint32(l), nil }