Skip to content

[3.10] gh-91700: Validate the group number in conditional expression in RE (GH-91702) #91831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

serhiy-storchaka
Copy link
Member

In expression (?(group)...) an appropriate re.error is now
raised if the group number refers to not defined group.

Previously it raised RuntimeError: invalid SRE code.
(cherry picked from commit 48ec61a)

…ssion in RE (pythonGH-91702)

In expression (?(group)...) an appropriate re.error is now
raised if the group number refers to not defined group.

Previously it raised RuntimeError: invalid SRE code..
(cherry picked from commit 48ec61a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot bedevere-bot added type-bug An unexpected behavior, bug, or error awaiting core review labels Apr 22, 2022
@serhiy-storchaka serhiy-storchaka merged commit 080781c into python:3.10 Apr 22, 2022
@serhiy-storchaka serhiy-storchaka deleted the backport-48ec61a-3.10 branch April 22, 2022 18:09
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.9 only security fixes label Apr 22, 2022
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-91836 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Apr 22, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 22, 2022
…ssion in RE (pythonGH-91702) (pythonGH-91831)

In expression (?(group)...) an appropriate re.error is now
raised if the group number refers to not defined group.

Previously it raised RuntimeError: invalid SRE code.
(cherry picked from commit 48ec61a)
(cherry picked from commit 080781c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Apr 22, 2022
…n RE (GH-91702) (GH-91831) (GH-91836)

In expression (?(group)...) an appropriate re.error is now
raised if the group number refers to not defined group.

Previously it raised RuntimeError: invalid SRE code.
(cherry picked from commit 48ec61a)
(cherry picked from commit 080781c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
…sion in RE (pythonGH-91702) (pythonGH-91831) (pythonGH-91836)

In expression (?(group)...) an appropriate re.error is now
raised if the group number refers to not defined group.

Previously it raised RuntimeError: invalid SRE code.
(cherry picked from commit 48ec61a)
(cherry picked from commit 080781c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants