GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.10] gh-90949: expose Expat API to tune exponential expansion protections (GH-139368) (#151401) by StanFromIreland · Pull Request #155414 · python/cpython

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented Aug 9, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Expose the XML Expat 2.7.2 APIs to tune protections against "billion laughs" [1] attacks.

The exposed APIs are available on Expat parsers, that is, parsers created by xml.parsers.expat.ParserCreate(), as:

  • parser.SetBillionLaughsAttackProtectionActivationThreshold(threshold), and
  • parser.SetBillionLaughsAttackProtectionMaximumAmplification(max_factor).

This completes the work in f04bea4, and improves the existing related documentation.

[1]: https://en.wikipedia.org/wiki/Billion_laughs_attack (cherry picked from commit 6661123) (cherry picked from commit 19bc391)

(cherry picked from commit db195e3)

  • Issue: Expose Expat XML attack protection APIs #90949

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@StanFromIreland @picnixz
[3.10] pythongh-90949: expose Expat API to tune exponential expansion…
8487625
… protections (pythonGH-139368) (python#151401)

Expose the XML Expat 2.7.2 APIs to tune protections against
"billion laughs" [1] attacks.

The exposed APIs are available on Expat parsers, that is,
parsers created by `xml.parsers.expat.ParserCreate()`, as:

- `parser.SetBillionLaughsAttackProtectionActivationThreshold(threshold)`, and
- `parser.SetBillionLaughsAttackProtectionMaximumAmplification(max_factor)`.

This completes the work in f04bea4,
and improves the existing related documentation.

[1]: https://en.wikipedia.org/wiki/Billion_laughs_attack
(cherry picked from commit 6661123)
(cherry picked from commit 19bc391)

Co-authored-by: Bénédikt Tran <[email protected]>
(cherry picked from commit db195e3)
@StanFromIreland StanFromIreland assigned pablogsal Aug 9, 2026
This was referenced Aug 9, 2026
Expose Expat XML attack protection APIs #90949
Closed
[3.12] gh-90949: expose Expat API to tune exponential expansion protections (GH-139368) #151401
Merged
@read-the-docs-community

read-the-docs-community Bot commented Aug 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33988660 | 📁 Comparing 929e7e1 against main (998b890)

  🔍 Preview build  

577 files changed · + 19 added · ± 470 modified · - 88 deleted

+ Added

  • c-api/objbuffer.html
  • distutils/_setuptools_disclaimer.html
  • distutils/apiref.html
  • distutils/builtdist.html
  • distutils/commandref.html
  • distutils/configfile.html
  • distutils/examples.html
  • distutils/extending.html
  • distutils/index.html
  • distutils/introduction.html
  • and 9 more...

± Modified

  • about.html
  • bugs.html
  • copyright.html
  • glossary.html
  • index.html
  • license.html
  • py-modindex.html
  • search.html
  • c-api/abstract.html
  • c-api/allocation.html
  • and 460 more...

- Deleted

  • 404.html
  • improve-page-nojs.html
  • improve-page.html
  • _static/tachyon-example-flamegraph.html
  • _static/tachyon-example-heatmap.html
  • c-api/curses.html
  • c-api/extension-modules.html
  • c-api/frame.html
  • c-api/hash.html
  • c-api/interp-lifecycle.html
  • and 78 more...
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland

StanFromIreland commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

CC @python/windows-team any ideas as to why the Windows build failed?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
Merge branch '3.10' into backport-db195e3-3.10
929e7e1
@hugovk

hugovk commented Aug 10, 2026

Copy link
Copy Markdown
Member

Windows should pass now #153610 is merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Aug 10, 2026

Copy link
Copy Markdown
Member

macOS fix is #153312.

StanFromIreland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland
StanFromIreland marked this pull request as ready for review August 10, 2026 09:07
@bedevere-app bedevere-app Bot added the awaiting core review label Aug 10, 2026
@pablogsal
pablogsal merged commit 14c3f89 into python:3.10 Aug 10, 2026
14 of 15 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@pablogsal pablogsal

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@StanFromIreland @hugovk @pablogsal
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.