mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Python: Add consistency checks
This commit is contained in:
9
python/ql/test/library-tests/regexparser/unittests.py
Normal file
9
python/ql/test/library-tests/regexparser/unittests.py
Normal file
@@ -0,0 +1,9 @@
|
||||
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.
|
||||
Reference in New Issue
Block a user