Skip to content

Commit 8d1c926

Browse files
authored
Merge pull request #2148 from certtools/fix-2138
FIX: CodeQL exponential backtracking on strings
2 parents 1dc5364 + 69b9aad commit 8d1c926

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ CHANGELOG
9494
- Decorator `skip_ci` also detects `dpkg-buildpackage` environments by checking the environment variable `DEB_BUILD_ARCH` (PR#2123 by Sebastian Wagner).
9595
- Also test on Python 3.10 (PR#2140 by Sebastian Wagner).
9696
- Switch from nosetests to pytest, as the former does not support Python 3.10 (PR#2140 by Sebastian Wagner).
97+
- CodeQL Github Actions `exponential backtracking on strings` fixed. (PR#2148 by Sebastian Waldbauer, fixes #2138)
9798

9899
### Tools
99100

intelmq/bots/parsers/sucuri/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def handle_data(self, data):
2222

2323

2424
parser = MyHTMLParser()
25-
remove_comments = re.compile(r"<!--(.|\s|\n)*?-->")
25+
remove_comments = re.compile(r"<!--.*?-->", re.DOTALL)
2626

2727

2828
class SucuriParserBot(ParserBot):

0 commit comments

Comments
 (0)