-
-
Notifications
You must be signed in to change notification settings - Fork 151
TOML: check nesting depth (CVE-2023-3894) #398
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
Conversation
|
this seems like a better fix than #395. the only thing i'm concerned about is the difference of toml to the other formats. someone using only the streaming apis might set the max stream depth fairly high because they think they cannot run into the data binding issues it exists to avoid. however with toml, the depth limit is critical for streaming as well (since there is no real streaming for toml), not just for binding. but this is probably not a realistic issue, so this still seems superior. |
|
@pjfanning i dont think the nesting check is necessary? it should be caught by the parser, every start token will have a pollExpected with the corresponding end token |
|
@yawkat I'll probably remove the check. I just wanted to see if there were any existing tests where the depth misbehaves. I'll leave the check there for the moment but as I say, I'm likely to remove it before merging. |
|
maybe it can be an |
37099a3 to
a05e4f3
Compare
|
LGTM, but wanted to make sure this is to be merged -- anything else to wait for, change? LMK and I'll merge it to 2.15, master. |
|
it's ok to merge - I'll follow up with more tests in another PR |
|
Ok managed to merge to |
Uh oh!
There was an error while loading. Please reload this page.