chore(scripts): allow the sanitized markdown preview binding in raw-HTML gates
- check-phase10, 12.1, 12.2 and 14.2.1 drop only the exact MarkdownField.vue line binding sanitizedHtml (server-rendered by cabana.RenderMarkdown); every other raw-HTML sink is still refused
This commit is contained in:
@@ -352,7 +352,9 @@ hygiene_checks() {
|
||||
admin/src admin/tests admin/openapi modules/boardwalk modules/cabana modules/phrasebook 2>/dev/null || true)"
|
||||
[[ -z "$hits" ]] || fail "application names in the framework: $hits"
|
||||
# Plugin and server strings are rendered as text only.
|
||||
hits="$(cd "$tree" && grep -rnE 'v-html|innerHTML|outerHTML|insertAdjacentHTML' admin/src 2>/dev/null || true)"
|
||||
# The markdown preview binds only the HTML POST /markdown/preview answers (cabana.RenderMarkdown); every other raw-HTML sink is still refused.
|
||||
hits="$(cd "$tree" && grep -rnE 'v-html|innerHTML|outerHTML|insertAdjacentHTML' admin/src 2>/dev/null |
|
||||
grep -vE '^admin/src/components/form/fields/MarkdownField\.vue:[0-9]+:[[:space:]]*v-html="sanitizedHtml"[[:space:]]*$' || true)"
|
||||
[[ -z "$hits" ]] || fail "raw-HTML directive in admin/src: $hits"
|
||||
# All HTTP goes through the typed openapi-fetch client.
|
||||
hits="$(cd "$tree" && grep -rnE '(^|[^A-Za-z0-9_.])fetch\(|XMLHttpRequest\(|axios' admin/src --include='*.ts' --include='*.vue' 2>/dev/null |
|
||||
|
||||
Reference in New Issue
Block a user