Files
codeql/python/ql/test/library-tests/regexparser/unittests.py
Rasmus Lerchedahl Petersen 34b054ff53 Python: Add consistency checks
2021-08-11 14:58:27 +02:00

10 lines
231 B
Python

import re
# Treatment of escapes
re.compile(r"X([^\.]|\.)*$") # No ReDoS.
re.compile(r"X(Æ|\Æ)+$") # Has ReDoS.
# Treatment of line breaks
re.compile(r'(?:.|\n)*b') # No ReDoS.
re.compile(r'(?:.|\n)*b', re.DOTALL) # Has ReDoS.