mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-12-22 20:52:19 +01:00
Make sure limit is between 1 and 100
We were not properly checking whether the limit was actually less than or equal to 100.
This commit is contained in:
parent
3995eba0a7
commit
88a8db6c78
@ -103,7 +103,7 @@ def validate_items_post_parameters(req, resp, resource, params):
|
||||
|
||||
# Parse the limit parameter from the POST request body
|
||||
if "limit" in doc:
|
||||
if isinstance(doc["limit"], int) and 0 < doc["limit"] < 100:
|
||||
if isinstance(doc["limit"], int) and 0 < doc["limit"] <= 100:
|
||||
req.context.limit = doc["limit"]
|
||||
else:
|
||||
raise falcon.HTTPBadRequest(
|
||||
|
Loading…
Reference in New Issue
Block a user