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 #3699

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Conversation

seanmonstar
Copy link
Member

This is a backport of #3698 to 0.14.x.


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.

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 4a51b2a into 0.14.x Jul 9, 2024
19 checks passed
@seanmonstar seanmonstar deleted the backport-3698 branch July 9, 2024 13:34
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.

None yet

1 participant