Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Minor] Negative values in count and page provoke a 500 error #18

Closed
fra967 opened this issue Feb 17, 2016 · 0 comments
Closed

[Minor] Negative values in count and page provoke a 500 error #18

fra967 opened this issue Feb 17, 2016 · 0 comments
Assignees

Comments

@fra967
Copy link

fra967 commented Feb 17, 2016

If count is set to a negative number, it is passed down to MongoDB provoking a "bad skip value in query" exception and a 500 error is returned by API. A similar situation happens with page <= 0.
The error is recorded in API log.

Queries with invalid count and page values should either be corrected with default values, or captured and logged as invalid, but not executed in MongoDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants