FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.13] gh-146333: Fix quadratic regex backtracking in configparser option parsing (GH-146399) by encukou · Pull Request #148559 · python/cpython · GitHub

/ cpython Public

[3.13] gh-146333: Fix quadratic regex backtracking in configparser option parsing (GH-146399) - #148559

Merged
encukou merged 1 commit into
python:3.13from
encukou:backport-7e0a0be-3.13
Apr 15, 2026
Merged

[3.13] gh-146333: Fix quadratic regex backtracking in configparser option parsing (GH-146399)#148559
encukou merged 1 commit into
python:3.13from
encukou:backport-7e0a0be-3.13

Conversation

encukou commented Apr 14, 2026
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Use negative lookahead in option regex to prevent backtracking, and to avoid changing logic outside the regexes (since people could use the regex directly).

(cherry picked from commit 7e0a0be)

…ser option parsing (pythonGH-146399)

Use negative lookahead in option regex to prevent backtracking, and to avoid changing logic outside the regexes (since people could use the regex directly).
(cherry picked from commit 7e0a0be)

Co-authored-by: Joshua Swanson <22283299+joshuaswanson@users.noreply.github.com>

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11, 3.12.
🐍🍒⛏🤖

Copy link
Copy Markdown

Sorry, @encukou, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker a5969e8f0fda37aaf0e2f844fdcfca9d822a70b1 3.12

encukou deleted the backport-7e0a0be-3.13 branch April 15, 2026 10:11

Copy link
Copy Markdown

Sorry, @encukou, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker a5969e8f0fda37aaf0e2f844fdcfca9d822a70b1 3.11

Copy link
Copy Markdown

Sorry, @encukou, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker a5969e8f0fda37aaf0e2f844fdcfca9d822a70b1 3.10

Copy link
Copy Markdown
Member

Please don't forget about backports.

bedevere-app Bot commented Jul 19, 2026

Copy link
Copy Markdown

GH-154081 is a backport of this pull request to the 3.12 branch.

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jul 19, 2026

bedevere-app Bot commented Jul 29, 2026

Copy link
Copy Markdown

GH-154877 is a backport of this pull request to the 3.11 branch.

bedevere-app Bot removed the needs backport to 3.11 only security fixes label Jul 29, 2026

bedevere-app Bot commented Jul 29, 2026

Copy link
Copy Markdown

GH-154878 is a backport of this pull request to the 3.10 branch.

bedevere-app Bot removed the needs backport to 3.10 only security fixes label Jul 29, 2026
Yhg1s pushed a commit that referenced this pull request Aug 4, 2026
…tion parsing (GH-146399) (GH-148559) (#154081)

Use negative lookahead in option regex to prevent backtracking, and to avoid changing logic outside the regexes (since people could use the regex directly).
(cherry picked from commit 7e0a0be)


(cherry picked from commit a5969e8)

Co-authored-by: Joshua Swanson <22283299+joshuaswanson@users.noreply.github.com>
pablogsal pushed a commit that referenced this pull request Aug 10, 2026
…tion parsing (GH-146399) (GH-148559) (#154877)

[3.12] gh-146333: Fix quadratic regex backtracking in configparser option parsing (GH-146399) (GH-148559)

Use negative lookahead in option regex to prevent backtracking, and to avoid changing logic outside the regexes (since people could use the regex directly).
(cherry picked from commit 7e0a0be)


(cherry picked from commit a5969e8)

Co-authored-by: Joshua Swanson <22283299+joshuaswanson@users.noreply.github.com>
pablogsal pushed a commit that referenced this pull request Aug 10, 2026
…tion parsing (GH-146399) (GH-148559) (#154878)

Use negative lookahead in option regex to prevent backtracking, and to avoid changing logic outside the regexes (since people could use the regex directly).
(cherry picked from commit 7e0a0be)


(cherry picked from commit a5969e8)

Co-authored-by: Joshua Swanson <22283299+joshuaswanson@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL