Repository navigation
fix(server): parse request bodies nested to the depth the service validates #807
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
Open
LeeroyHannigan
wants to merge
20
commits into
main
Choose a base branch
from
fix/request-nesting-depth
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,218
−68
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0ff163a
fix(server): parse request bodies nested to the depth the service val…
LeeroyHannigan bd05ef8
Merge remote-tracking branch 'origin/main' into merge/807-redo2
LeeroyHannigan 3a94df0
fix(server): parse a body past serde's depth only after authentication
LeeroyHannigan a3a991b
test(nesting): accept the service's varying answer past 1700 wrappers
LeeroyHannigan e2e58e3
test(nesting): retry a 500 in the raw sender and align the depth figures
LeeroyHannigan 99542cb
fix(server): check a deep body's syntax before authentication
LeeroyHannigan b8fee45
docs(server): say what the service does with an unknown deep member
LeeroyHannigan 5d71902
test(server): pin the 5200 level ceiling in the depth scan rows
LeeroyHannigan 1f49125
docs(server): say which deep malformed bodies reach authentication
LeeroyHannigan c73c1b0
fix(server): skip a deep body with the service's grammar before authe…
LeeroyHannigan bb44727
test(server): pin the message boundary of the syntax check's refusal
LeeroyHannigan 3dad856
docs(server): list the forms the syntax check passes to authentication
LeeroyHannigan 51cc638
refactor(server): move the syntax scan into its own module
LeeroyHannigan ce77837
Merge origin/main into fix/request-nesting-depth
LeeroyHannigan 4c2995c
Merge origin/main into fix/request-nesting-depth
LeeroyHannigan b9baaf5
Merge origin/main into fix/request-nesting-depth
LeeroyHannigan acfd6a6
Merge origin/main into fix/request-nesting-depth
LeeroyHannigan 1a9efd7
refactor(server): run the engine's operation check and admit around t…
LeeroyHannigan 027483d
docs(wasm): say that admit runs on the result of parse_request
LeeroyHannigan 71b3e1b
test(server): pin the edges of the syntax check's looser rules
LeeroyHannigan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A malformed body deeper than 127 levels skips the syntax check before authentication. Measured 2026-11-16, an unsigned PutItem of
xfollowed by 6000[is 400{"__type":"com.amazon.coral.service#SerializationException"}on the service on 2 of 2 sends, and on the previous head too. Here it is MissingAuthenticationToken, and InvalidSignatureException with a bad signature. Unsigned truncated PutItem bodies at 63, 200 and 2000 wrappers get the SerializationException from the service and the authentication error here. A syntax check that walks the body in one loop likenesting_depth, with a stack of container kinds, would refuse these before authentication without recursing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 99542cb, the handler runs
check_request_syntaxbefore authentication on a body deeper than 127 levels. The check deserializes the body asserde::de::IgnoredAny, which serde_json skips in one loop with a Vec of open container kinds, so it doesn't recurse.Unsigned and badly signed,
xplus 6000[and truncated PutItem bodies at 63, 200, 2000 and 20000 wrappers are now a 400 SerializationException. That's the service's status and type on 2 of 2 sends each (us-east-1, 2026-11-20). Past the 5200 level ceiling the whole response body matches. Within it, our response keeps the message field a shallow malformed body has always had, where the service sends none (#1195).