Files
codeql/python/ql/test/query-tests/Security/CWE-730-ReDoS/unittests.py
2021-07-15 14:15:24 +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.