Skip to content

Commit

Permalink
fix with ReDoS security issue in purge.comments() (thanks @ready-rese…
Browse files Browse the repository at this point in the history
  • Loading branch information
GammaC0de committed Sep 25, 2021
1 parent fbd9d7d commit 0ff11b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyload/core/utils/web/purge.py
Expand Up @@ -4,7 +4,7 @@
import re
from email.header import decode_header as decode_rfc2047_header

_RE_COMMENTS = re.compile(r"<!--.*?-->", flags=re.S)
_RE_COMMENTS = re.compile(r"<!--(?:(?!<!--).)*-->", flags=re.S)
_RE_TAGS = re.compile(r"<[^<]+?>")
_RE_RFC2047 = re.compile(r"=\?([^?]+)\?([QB])\?([^?]*)\?=")

Expand Down

0 comments on commit 0ff11b5

Please sign in to comment.