Skip to content

compare url attribute names case-insensitively when sanitizing#21434

Open
NullVoxPopuli wants to merge 1 commit into
mainfrom
nvp/sanitize-url-attr-case
Open

compare url attribute names case-insensitively when sanitizing#21434
NullVoxPopuli wants to merge 1 commit into
mainfrom
nvp/sanitize-url-attr-case

Conversation

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

checkURI and checkDataURI matched attribute names against the lowercase badAttributes lists with a strict comparison, so a mixed-case name such as HREF or SRC bypassed the javascript:/vbscript: protocol check even though requiresSanitization still routed the element through the sanitizer.


Supersedes: #21430

Repro: https://limber.glimdown.com/edit?c=MYewdgzgLgBAZiEMC8MDkArAhgNyxYAJwEsAHKALlEhABsBTAOlpAHMAKAIgAtjOBKNAG4AUCIA8UegFtStLFIB8ImDHFYY3QvTjIA3noQgAvscVad4gPRZlq9TAASAJQCiAMX2HEpxS4-WthJWUrLySkA&format=gjs

checkURI and checkDataURI matched attribute names against the lowercase badAttributes lists with a strict comparison, so a mixed-case name such as HREF or SRC bypassed the javascript:/vbscript: protocol check even though requiresSanitization still routed the element through the sanitizer.
@github-actions
Copy link
Copy Markdown
Contributor

📊 Size report

Tarball size1.2 MB1.2 MB

dist/dev   0%↑

File Before (Size / Brotli) After (Size / Brotli)
Total (Includes all files) 2 MB / 479.3 kB 0%↑2 MB / 0.01%↑479.4 kB

dist/prod   0%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/shared-chunks/api-{hash}.js 5.9 kB / 1.5 kB 40%↑8.3 kB / 21%↑1.8 kB
Total (Includes all files) 1.8 MB / 437.2 kB 0%↑1.8 MB / -0%↓437.2 kB

smoke-tests/v2-app-hello-world-template/dist   0.01%↑

File Before (Size / Brotli) After (Size / Brotli)
Total (Includes all files) 235 kB / 64.4 kB 0.01%↑235 kB / 0.1%↑64.4 kB

🤖 This report was automatically generated by wyvox/pkg-size

@NullVoxPopuli NullVoxPopuli requested a review from kategengler May 29, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants