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

Improve approach for handling bad characters in most endpoints #944

Closed
slubar opened this issue Dec 7, 2022 · 1 comment
Closed

Improve approach for handling bad characters in most endpoints #944

slubar opened this issue Dec 7, 2022 · 1 comment
Assignees

Comments

@slubar
Copy link
Contributor

slubar commented Dec 7, 2022

The index.js files for the cve, cve-id, and org controllers include numerous calls to the validate.js function escape() to convert the characters <, >, &, ', " and / to HTML entities. This has been deemed necessary to avoid some types of malicious attacks. However, rather than converting the characters to HTML entities, it would be better to throw an error indicating that the input is invalid.

@david-rocca
Copy link
Collaborator

After discussion, the subset of restricted special characters will be reduced to <, >, and ".

david-rocca added a commit that referenced this issue Nov 13, 2023
…iddleware to all query parameters, then wrote test
david-rocca added a commit that referenced this issue Nov 17, 2023
jdaigneau5 added a commit that referenced this issue Nov 17, 2023
Resolves issue #944 - Better filtering for invalid characters in query parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants