Skip to content

Commit

Permalink
FIX: CodeQL exponential backtracking on strings
Browse files Browse the repository at this point in the history
As suggested in #2138, credits @monoidic

Fixes #2138

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
  • Loading branch information
waldbauer-certat committed Feb 1, 2022
1 parent 1dc5364 commit 9f99e5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ CHANGELOG
- Decorator `skip_ci` also detects `dpkg-buildpackage` environments by checking the environment variable `DEB_BUILD_ARCH` (PR#2123 by Sebastian Wagner).
- Also test on Python 3.10 (PR#2140 by Sebastian Wagner).
- Switch from nosetests to pytest, as the former does not support Python 3.10 (PR#2140 by Sebastian Wagner).
- CodeQL Github Actions `exponential backtracking on strings` fixed. (PR#2148 by Sebastian Waldbauer)

### Tools

Expand Down
2 changes: 1 addition & 1 deletion intelmq/bots/parsers/sucuri/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def handle_data(self, data):


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


class SucuriParserBot(ParserBot):
Expand Down

0 comments on commit 9f99e5d

Please sign in to comment.