Skip to content

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

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

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

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 27, 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 [email protected]

…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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants