fix(guardrails): bound DATA_ATTR, SCRIPT_SRC, TRACE_MARKERS and the comment blankers, SENSITIVE_KEY aligned with the spec, 5xx map SKIPPED, base64 inline maps only, RecursionError and supabase shape guarded, large .map head read

This commit is contained in:
bchanot committed 2026-10-19 01:19:40 +02:00
1 parent 0de2e8a48a
commit 5643e9dbd4
7 files changed
+82 -15

No files matched your search

+3 -2
View File
@@ -54,9 +54,10 @@ def redact(value):
return value[:6] + "..."
SQL_COMMENT = re.compile(r"--[^\n]*|/\*.*?\*/", re.S)
SQL_COMMENT = re.compile(r"--[^\n]*|/\*[\s\S]{0,4000}?\*/")
MARKUP_COMMENT = re.compile(
r"<!--.*?-->|/\*.*?\*/|(?:^|(?<=\s))//[^\n]*", re.S | re.M)
r"<!--(?:[^<]|<(?!!--)){0,4000}?-->|/\*[\s\S]{0,4000}?\*/"
r"|(?:^|(?<=\s))//[^\n]*", re.M)
def _blank(pattern, text):