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

Global "allowReservedInQueryParameters" flag #1038

Open
briangweber opened this issue Jan 6, 2025 · 0 comments
Open

Global "allowReservedInQueryParameters" flag #1038

briangweber opened this issue Jan 6, 2025 · 0 comments

Comments

@briangweber
Copy link

Is your feature request related to a problem? Please describe.
We are migrating from the old swagger-tools library, which is much more permissive of reserved characters in the querystring. Express handles these parameters just fine either encoded or unencoded, so while best practices should be to encode query parameters, this validation is overly strict for our usage.

Describe the solution you'd like
A global setting possibly under validateRequests to allow reserved characters in all query parameters.

Describe alternatives you've considered
We could add allowReserved to all query parameters, but it is easy to miss them which can easily cause a production outage as clients start receiving 422 errors for previously permissible requests (happened today - user was passing 1234+ABC for a postal code).

Additional context
I'm happy to collaborate on a fix or implement it with some guidance - I don't see a way to thread global settings through to the location where validation seems to be happening

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

1 participant