Skip to content
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

fix(http1): reject final chunked if missing 0 #3698

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

seanmonstar
Copy link
Member

@seanmonstar seanmonstar commented Jul 9, 2024

If a chunked body had valid chunks, but ended without a 0 in the final chunk (so, just \r\n\r\n), it would be parsed as a valid end. Now it will be rejected as the final chunk MUST be 0\r\n\r\n.

This was partially done before (#3494), but only if there were no chunks before the final. This fixes both paths.

If a chunked body had valid chunks, but ended without a `0` in the final
chunk (so, just `\r\n\r\n`), it would be parsed as a valid end. Now it
will be rejected as the final chunk MUST be `0\r\n\r\n`.

This was partially done before, but only if there were no chunks before
the final. This fixes both paths.
@seanmonstar seanmonstar merged commit 8e5de1b into master Jul 9, 2024
21 checks passed
@seanmonstar seanmonstar deleted the fix-chunked-missing-zero-after-good-chunk branch July 9, 2024 13:05
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