-
Notifications
You must be signed in to change notification settings - Fork 75
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
possibly confusing count_only behavior #802
Comments
Change the endpoint to allow both 0/1 and true/false. All other values should throw an error. Swagger docs will need to be updated to reflect the change |
slubar
added a commit
that referenced
this issue
Dec 14, 2022
slubar
added a commit
that referenced
this issue
Dec 14, 2022
brettp
added a commit
that referenced
this issue
Dec 14, 2022
#802 Update boolean query parameters to accept 0,1,true,false,yes,no …
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://cveawg-test.mitre.org/api-docs/ says
The actual behavior seems to be that "true" and "false" are also accepted, but both "true" and "false" are equivalent to 0.
This seems to be caused by the interaction among:
cve-services/src/controller/cve.controller/cve.controller.js
Line 98 in 3b7608f
and
cve-services/src/controller/cve.controller/index.js
Line 148 in 3b7608f
and the definition of isBoolean in
https://github.com/validatorjs/validator.js/blob/master/README.md
In other words, "true" is considered a valid syntax, but the
=== '1'
test, in effect, interprets true as false. A possible solution is to modify index.js to useinstead of
The text was updated successfully, but these errors were encountered: