-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should about:blank inherit CSP in addition to origin? #2592
Comments
//cc @mikewest |
Also referrer-policy? |
Also, we've said things like the service worker controller should be inherited along with the origin: |
So I wrote a testcase:
and as far as I can tell, Firefox, Chrome, Safari, and Edge all apply the CSP from the parent to the subframe in this case. |
I guess this is kinda handled in https://w3c.github.io/webappsec-csp/#initialize-document-csp sorta. It's weird that we do this quite differently for about:blank and srcdoc... |
Related: #1445. |
@antosart I imagine this is now well-specified since CSP is in the policy container. Is it well-tested as well? |
Yes, it is now well-specified and fully tested (see the inheritance folder inside CSP WPTs, and in particular iframe-all-local-schemes.sub.html and window.html. Marking as closed. |
Right now per spec it does not. That seems a bit odd, and a way for people to sneak things in past CSP if a page just uses a blank iframe as an extra rendering area.
The text was updated successfully, but these errors were encountered: