Visitar URL original
[3.14] gh-150751: validate http.client Content-Length and chunk-size (GH-150752) by miss-islington · Pull Request #159020 · python/cpython · GitHub
Skip to content

[3.14] gh-150751: validate http.client Content-Length and chunk-size (GH-150752) - #159020

Open
miss-islington wants to merge 1 commit into
python:3.14from
miss-islington:backport-2eb2af8-3.14
Open

miss-islington wants to merge 1 commit into
python:3.14from
miss-islington:backport-2eb2af8-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RFC 9112 defines Content-Length as 1DIGIT and chunk-size as 1HEXDIG, but int() also accepts a sign, underscores, surrounding whitespace and an 0x prefix, so malformed framing values were parsed instead of rejected.
(cherry picked from commit 2eb2af8)

Co-authored-by: metsw24-max metsw24@gmail.com

…ythonGH-150752)

RFC 9112 defines Content-Length as 1*DIGIT and chunk-size as 1*HEXDIG, but int() also accepts a sign, underscores, surrounding whitespace and an 0x prefix, so malformed framing values were parsed instead of rejected.
(cherry picked from commit 2eb2af8)

Co-authored-by: metsw24-max <metsw24@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants