by asicsp · 4y ago · 0 comments
Python `re` module now supports possessive quantifiers and atomic grouping (I wrote a blog post here [2]). So, for example, `(a+|\w+)*+:` instead of `(a+|\w+)*:` will avoid such catastrophic behavior.
[1] https://blog.cloudflare.com/details-of-the-cloudflare-outage...
[2] https://learnbyexample.github.io/python-regex-possessive-qua...
https://vtechworks.lib.vt.edu/bitstream/handle/10919/98593/D...
(disclosure: I work for Doyensec)