Join GitHub today
[3.6] bpo-32981: Fix catastrophic backtracking vulns (GH-5955) #5971
The regex to test a mail server's timestamp is susceptible to
Happily, the maximum length of malicious inputs is 2K thanks
A 2KB evil response from the mail server would result in small slowdowns
Replace it with a similar non-vulnerable regex.
The new regex is RFC compliant.
The default regex for IS_LINE_JUNK is susceptible to
Replace it with an equivalent non-vulnerable regex.
Also introduce unit and REDOS tests for difflib.