Skip to content

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

Open
miss-islington wants to merge 1 commit intopython:3.14from
miss-islington:backport-7e0a0be-3.14
Open

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

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented Apr 9, 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)

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

…ion 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants