Revert "GHSL-2021-113: fix ReDoS bug"

This commit is contained in:
Liam Newman 2021-12-07 02:03:17 -08:00 committed by GitHub
parent 4b3fb8502f
commit 229b23732e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,7 @@ reserved_word_pattern = re.compile(r"^(?:" + "|".join(reserved_words) + r")$")
directives_core = Directives(r"/\*", r"\*/")
xmlRegExp = re.compile(
r'[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[\s\S]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*(\'[^\']*\'|"[^"]*"))*\s*(/?)\s*>'
r'[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\]|)(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*(\'[^\']*\'|"[^"]*"|{[\s\S]+?}))*\s*(/?)\s*>'
)