1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00

test(csp): the inline script check finds <SCRIPT> in any case

This commit is contained in:
catborise 2026-11-23 15:16:23 +03:00
parent e88f568f6a
commit 3872eb1762

View file

@ -10,7 +10,7 @@ from django.test import SimpleTestCase, TestCase
from django.urls import reverse
# a <script> without src that is not json_script data
INLINE_SCRIPT = re.compile(r"<script(?![^>]*\bsrc=)(?![^>]*application/json)[^>]*>")
INLINE_SCRIPT = re.compile(r"<script(?![^>]*\bsrc=)(?![^>]*application/json)[^>]*>", re.I)
INLINE_HANDLER = re.compile(r"\son[a-z]+\s*=", re.I)