diff --git a/api/handler/list.go b/api/handler/list.go index 82401b0..9c018e8 100644 --- a/api/handler/list.go +++ b/api/handler/list.go @@ -289,7 +289,7 @@ func parseListObjectArgs(r *http.Request) (*listObjectsArgs, error) { if r.URL.Query().Get("max-keys") == "" { res.MaxKeys = maxObjectList - } else if res.MaxKeys, err = strconv.Atoi(r.URL.Query().Get("max-keys")); err != nil { + } else if res.MaxKeys, err = strconv.Atoi(r.URL.Query().Get("max-keys")); err != nil || res.MaxKeys <= 0 { return nil, api.GetAPIError(api.ErrInvalidMaxKeys) }