Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit faa011b

Browse files
kevinbackhouseencukou
authored andcommitted
Fix ReDoS in regex.
1 parent 404c36b commit faa011b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/ldap/schema/tokenizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
r"|" # or
1414
r"([^'$()\s]+)" # string of length >= 1 without '$() or whitespace
1515
r"|" # or
16-
r"('(?:[^'\\]|\\\\|\\.)*?'(?!\w))"
16+
r"('(?:[^'\\]|\\.)*'(?!\w))"
1717
# any string or empty string surrounded by unescaped
1818
# single quotes except if right quote is succeeded by
1919
# alphanumeric char

0 commit comments

Comments
 (0)