Skip to content

Frame CSP: img-src admits data:, so the stylesheet's SVG checkboxes render - #177

Merged
lannbot merged 1 commit into
mainfrom
fix/frame-csp-data-images
Sep 8, 2026
Merged

Frame CSP: img-src admits data:, so the stylesheet's SVG checkboxes render#177
lannbot merged 1 commit into
mainfrom
fix/frame-csp-data-images

Conversation

@lannbot

@lannbot lannbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #170: the stylesheet applies, but TodoMVC's checkboxes are data: SVG background-images (todomvc-app.css .toggle + label), and the frame's CSP was img-src blob:, so they were blocked and the toggles rendered as nothing.

img-src now also admits data:. A data: URL fetches nothing — its bytes are inline in the stylesheet that names it — so the frame stays network-dead. This does not loosen what the app may author: an <img src="data:..."> op is still refused by the receiver policy (web/policy.ts, URL-kind attributes take asset handles only), which is a separate check from the CSP.

frame-network-dead gains a probe that loads a data: image inside the frame; verified it fails against the old CSP and passes with the new one. just e2e 17/17. Automerge armed.

…ender

TodoMVC's checkboxes are data: SVG background images in its stylesheet;
the frame's img-src blob: blocked them, so the toggles were invisible. A
data: URL fetches nothing — its bytes are inline in the stylesheet that
names it — so the frame stays network-dead. App-authored <img src=data:>
is still refused by the receiver policy. frame-network-dead now loads a
data: image in the frame and fails if the CSP blocks it.
@lannbot
lannbot enabled auto-merge September 8, 2026 00:50
@lannbot
lannbot merged commit dbdbc0c into main Sep 8, 2026
2 checks passed
@lannbot
lannbot deleted the fix/frame-csp-data-images branch September 8, 2026 00:56
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