Skip to content

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

Open
encukou wants to merge 1 commit intopython:3.13from
encukou:backport-7e0a0be-3.13
Open

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

Conversation

@encukou
Copy link
Copy Markdown
Member

@encukou encukou commented Apr 14, 2026

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants