Skip to content

Security 6.5.8 - #3704

Merged
bdarnell merged 7 commits into
tornadoweb:branch6.5from
bdarnell:security-6.5.8
Aug 7, 2026
Merged

Security 6.5.8#3704
bdarnell merged 7 commits into
tornadoweb:branch6.5from
bdarnell:security-6.5.8

Conversation

@bdarnell

@bdarnell bdarnell commented Aug 6, 2026

Copy link
Copy Markdown
Member

No description provided.

bdarnell and others added 7 commits August 5, 2026 14:13
This prevents some CPU and memory amplification attacks.
Large POST bodies can be very expensive to parse in the worst case,
so use the (new in Python 3.8) max_num_fields argument to limit the
cost. A new field in ParseBodyConfig allows users to configure this
limit. The default is 1000, which is the same as that used in php and
node.js.
Cherry-picks c47659a from master to branch-6.5.
Modified to accelerate deprecation timeline to 6.7 instead of 7.0.
url.replace("http://", ...) replaced every occurrence of "http://" in
the fetched URL, including the one inside the "url" query parameter
that RedirectHandler uses as the redirect target. That accidentally
embedded the test credentials in the Location header's URL too, so
the "different origin" subtest was actually exercising "does libcurl
honor credentials the server explicitly put in the redirect target"
rather than "does libcurl strip credentials carried over from the
original request" - libcurl correctly does the former, which is not
a credential leak.

Limit the replacement to the first occurrence so only the outer,
fetched URL carries the test credentials.

Separately, the "same origin" subtest for this case now surfaces an
actual libcurl regression (still present in curl's git master as of
this writing): credentials embedded in the URL are dropped across a
same-origin redirect when the Location header is an absolute URL
(a relative Location correctly preserves them). This isn't a security
issue since nothing leaks to another origin, so that specific
assertion is skipped rather than asserted either way.
@bdarnell
bdarnell merged commit a55abe3 into tornadoweb:branch6.5 Aug 7, 2026
15 checks passed
@bdarnell
bdarnell deleted the security-6.5.8 branch August 7, 2026 02:42
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.

2 participants