Removed divide char and added comment restriction

pull/975/head
kompotkot 2023-11-30 13:11:20 +00:00
rodzic 44a79272df
commit 65f253145c
2 zmienionych plików z 3 dodań i 3 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

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