Fix checked parsing for argument and JSON depth limits - #3602
Open
AnnoyingTechnology wants to merge 2 commits into
Open
Fix checked parsing for argument and JSON depth limits#3602AnnoyingTechnology wants to merge 2 commits into
AnnoyingTechnology wants to merge 2 commits into
Conversation
|
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.



I have excess 5.6-sol and Fable 5 credits, and decided to use them to contribute back to OSS that I depend upon.
gpt5.6-sol cross-checked by Opus 4.8. Fable 5 could not cross-check due to safeties being triggered.
what
SecArgumentsLimitthrough its existing checkedConfigUnsignedIntwrapper.SecRequestBodyJsonDepthLimit.wrapper's range.
uint32_tmaximum,2^32, and decimals wider thanuint64_t.make checksuite.why
PR #3421 converted these fields to checked unsigned wrappers so out-of-range
configuration would fail during startup, but these two grammar productions
still assigned
atoi(...)directly.On the tested platform,
4294967296wrapped to zero. A zeroSecArgumentsLimitskipped every request argument, while a zeroSecRequestBodyJsonDepthLimitprevented the top-level JSON argument from beingexposed. The new code uses the same checked parsing pattern as the adjacent
body, PCRE, and upload limits.
This is configuration validation for trusted directives, not a remotely
triggerable vulnerability claim.
validation
SecArgumentsLimitregression: 2 passed, 0 failed.make check: 5,049 total; 4,997 passed; 52 skipped; 0 failed.git diff --check: pass.jq: pass.Base:
v3/masterat7ea9fefbe0ba409d8733b4d682c8c4c059cd028d.references
productions that still assigned
atoi(...)directly.