Python: Add consistency checks

This commit is contained in:
Rasmus Lerchedahl Petersen
2021-08-03 18:00:26 +02:00
parent d658ef1dcd
commit 34b054ff53
14 changed files with 535 additions and 1 deletions

View 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.