Frame CSP: img-src admits data:, so the stylesheet's SVG checkboxes render - #177
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #170: the stylesheet applies, but TodoMVC's checkboxes are
data:SVGbackground-images (todomvc-app.css.toggle + label), and the frame's CSP wasimg-src blob:, so they were blocked and the toggles rendered as nothing.img-srcnow also admitsdata:. Adata: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-deadgains a probe that loads adata:image inside the frame; verified it fails against the old CSP and passes with the new one.just e2e17/17. Automerge armed.