Skip to content
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

How should javascript: navigations interact with CSP? #2589

Open
bzbarsky opened this issue Apr 26, 2017 · 1 comment
Open

How should javascript: navigations interact with CSP? #2589

bzbarsky opened this issue Apr 26, 2017 · 1 comment
Labels

Comments

@bzbarsky
Copy link
Contributor

Given a navigation to a javascript: URL that returns a string, what should the CSP of the result be, if anything? Per spec right now it has no CSP, but it would make a lot more sense to me to pick up the CSP of ... well, I'm not sure. The content is coming from some combination of the "source browsing context" and the "active document" at the point when we did the evaluation (script comes from source, evaluates against active document's global), the URL comes from the active document, the origin comes from the active document.

@mikewest

@annevk
Copy link
Member

annevk commented Jul 27, 2017

Given <IFRAME SRC=javascript:alert(origin)></iframe> and <IFRAME SRC=javascript:alert(document.baseURI)></iframe> I think it would make sense if it inherited all those things from the same place. So wherever it got the origin and base URL from it would also get the CSP from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants