Skip to content

Reject query parameter values with invalid encoding or are too long - #505

Merged
ahx merged 2 commits into
mainfrom
reject-invalid-encoded-query-parameters
Oct 2, 2026
Merged

ahx merged 2 commits into
mainfrom
reject-invalid-encoded-query-parameters

Conversation

@ahx

@ahx ahx commented Sep 30, 2026

Copy link
Copy Markdown
Owner
  • Query and cookie parameter values with invalid encoding (like ?search=%C3) produce a 400 response now. Before such a value passed validation or raised an ArgumentError. This applies to documented and undocumented query parameter, but only to documented cookie parameters.
  • Fix: A query string with more parameters than Rack accepts (4096 by default) produces a 400 response now instead of raising Rack::QueryParser::QueryLimitError.

Bump version to 4.1.0

- Query and cookie parameter values with invalid encoding (like `?search=%C3`) produce a 400 response now. Before such a value passed validation or raised an `ArgumentError`. This applies to documented and undocumented query parameter, but only to documented cookie parameters.
- Fix: A query string with more parameters than Rack accepts (4096 by default) produces a 400 response now instead of raising `Rack::QueryParser::QueryLimitError`.
@ahx
ahx force-pushed the reject-invalid-encoded-query-parameters branch 2 times, most recently from 90a8b79 to 97657ac Compare October 1, 2026 15:12
- Query and cookie parameter values with invalid encoding (like `?search=%C3`) produce a 400 response now. Before such a value passed validation or raised an `ArgumentError`. This applies to documented and undocumented query parameter, but only to documented cookie parameters.
- A query string with more parameters than Rack accepts (4096 by default) produces a 400 response now instead of raising `Rack::QueryParser::QueryLimitError`.
@ahx
ahx force-pushed the reject-invalid-encoded-query-parameters branch from 97657ac to eb05036 Compare October 1, 2026 15:14
@ahx
ahx marked this pull request as ready for review October 1, 2026 15:16
@ahx

ahx commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Any thoughts on this? 📡

@ahx
ahx merged commit 1304806 into main Oct 2, 2026
32 checks passed
@ahx
ahx deleted the reject-invalid-encoded-query-parameters branch October 2, 2026 08:50
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

Successfully merging this pull request may close these issues.

1 participant