Merge pull request #975 from moonstream-to/allow-div-crawlers

Removed divide char and added comment restriction
pull/977/head
Sergei Sumarokov 2023-11-30 16:18:32 +03:00 zatwierdzone przez GitHub
commit 7ef8f61b7b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -23,7 +23,7 @@ from ..settings import MOONSTREAM_S3_QUERIES_BUCKET_PREFIX
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
QUERY_REGEX = re.compile("[\[\]@#$%^&?;`/]")
QUERY_REGEX = re.compile(r"[\[\]@#$%^&?;`]|/\*|\*/")
class QueryNotValid(Exception):

Wyświetl plik

@ -62,4 +62,4 @@ class TestQueries(unittest.TestCase):
queries.query_validation("OR(1=1)#")
with self.assertRaises(queries.QueryNotValid):
queries.query_validation("/etc/hosts")
queries.query_validation("0/**/or/**/1")