Skip to content

Commit

Permalink
Merge pull request #975 from moonstream-to/allow-div-crawlers
Browse files Browse the repository at this point in the history
Removed divide char and added comment restriction
  • Loading branch information
kompotkot authored Nov 30, 2023
2 parents 44a7927 + ea04e61 commit 7ef8f61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crawlers/mooncrawl/mooncrawl/stats_worker/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

QUERY_REGEX = re.compile("[\[\]@#$%^&?;`/]")
QUERY_REGEX = re.compile(r"[\[\]@#$%^&?;`]|/\*|\*/")


class QueryNotValid(Exception):
Expand Down
2 changes: 1 addition & 1 deletion crawlers/mooncrawl/mooncrawl/stats_worker/test_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ def test_query_validation(self):
queries.query_validation("OR(1=1)#")

with self.assertRaises(queries.QueryNotValid):
queries.query_validation("/etc/hosts")
queries.query_validation("0/**/or/**/1")

0 comments on commit 7ef8f61

Please sign in to comment.