Skip to content

Conversation

@picnixz
Copy link
Member

@picnixzpicnixz commented Sep 26, 2025

Copy link
Contributor

@hartworkhartwork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@picnixz already in pretty good shape 👍

Copy link
MemberAuthor

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the PR from the web UI but I'll do the rest tomorrow.

@picnixzpicnixz changed the title gh-90949: expose Expat mitigation API to prevent exponential expansionsgh-90949: expose Expat API to prevent exponential expansionsSep 27, 2025
Copy link
Contributor

@hartworkhartwork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@picnixz I like this new version! 👍

One question: There were changes in here to the previous related news file. This is what it reads on main today:

# cat Misc/NEWS.d/next/Library/2025-09-22-14-40-11.gh-issue-90949.UM35nb.rstAdd :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold`and :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification`to :ref:`xmlparser <xmlparser-objects>` objects to prevent use ofdisproportional amounts of dynamic memory from within an Expat parser.Patch by Bénédikt Tran.

From what we discussed here, this should probably says things about tuning also?
Should you or me create a follow-up pull request to adjust that after this?

@picnixz
Copy link
MemberAuthor

I'll amend the NEWS as part of this PR.

@picnixzpicnixz enabled auto-merge (squash) September 28, 2025 07:58
@picnixzpicnixz changed the title gh-90949: expose Expat API to prevent exponential expansionsgh-90949: expose Expat API to tune exponential expansion protectionsSep 28, 2025
@picnixzpicnixz merged commit 6661123 into python:mainSep 28, 2025
45 checks passed
@picnixzpicnixz deleted the feat/xml/1e9-lolz-api-90949 branch September 28, 2025 08:37
@picnixz
Copy link
MemberAuthor

Since this is built on top of many other PRs, I'll just wait for the others to be backported first.

@hartwork
Copy link
Contributor

Since this is built on top of many other PRs, I'll just wait for the others to be backported first.

@picnixz would the next step for #90949 be backporting this PR here to 3.10 to 3.14? If yes, should we include #139558 and #139800 and backport three in one? What do you think?

Sign up for freeto 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.

3 participants

@picnixz@hartwork@gpshead