Skip to content
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

Can't parse atomic groups #4

Open
FilipBruehl opened this issue Mar 23, 2021 · 3 comments
Open

Can't parse atomic groups #4

FilipBruehl opened this issue Mar 23, 2021 · 3 comments

Comments

@FilipBruehl
Copy link

I was scanning a bunch of regular expressions with some of them containing atomic groups. Every expression containing an atomic group triggered a parsing error indicating that ?> is an unknown extension. Is this desired behavior by regexploit or will they be supported in further versions?

@ihe-nu
Copy link

ihe-nu commented Apr 6, 2021

Hi,
this affects me as well. I would love to see this working.

@b-c-ds
Copy link
Contributor

b-c-ds commented Apr 6, 2021

Atomic groups currently aren't supported. I should probably make that explicit in the documentation. Atomic groups are not available in python's regular expression engine but regexploit could add some support for them.

It will be difficult to adapt the heuristic to handle them accurately, but we can start with an approximation of their behaviour with some false positives. Or begin by treating them like non-atomic groups but not causing an error. Not ideal.

While I can imagine some pathological regexes, do you have any real-world examples of ReDoS involving atomic groups?

@nth10sd
Copy link

nth10sd commented Aug 15, 2023

Atomic groups are not available in python's regular expression engine

They are supported from Python 3.11 onwards (scroll down to the (?>...) section), released on Oct 24, 2022.

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

No branches or pull requests

4 participants