Repository navigation
fix(request): refuse a query string past max_input_vars with 400 instead of cutting it (#413) - #431
Merged
Merged
Conversation
…ead of cutting it (#413)
Contributor
CoverageTotal lines: 85.93% → 85.95% (+0.02 pp)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #413.
getQuery()kept the firstmax_input_varspairs and dropped the rest without a word, and dropped a name nested pastmax_input_nesting_levelthe same way; a form body over the same limits is refused with 400. Decision (Edmond, 2026-10-20): refuse the query string the same way.http_request_ensure_uri_parsedrecords the refusal (query_refused_reason, a new field ofhttp_request_t); the path is still parsed.getQuery()andgetQueryParam()throwHttpException400 "the query string was refused: " on every call; uncaught, dispose answers 400.getPath()is unaffected.Changedentry.Tests:
h1/074answers 200 with three of four pairs on main and 400 after.http1parser/017and018asserted the cut and now assert the refusal.Local (ZTS DEBUG): full phpt 636 passed, 2 skipped in three runs; an earlier run before them had one failure whose test I did not capture, and it did not recur. cmocka 24 of 24.
Also:
dev/PLAN.mdrecords #413, and the #329 trace (Linux wakes the last-registered epoll first on a shared listening socket; comment on #329).