Merge pull request #136 from masterSplinter01/bugfix/135-max-keys-check

[#135] Add max-keys check to ListObjects
This commit is contained in:
Alex Vanin 2021-07-06 15:03:43 +03:00 committed by GitHub
commit f873be8019

View file

@ -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)
}