-
Notifications
You must be signed in to change notification settings - Fork 22
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
Define address space inheritance rules #27
Comments
See also #26 for sandboxed iframes. In the scope of this issue, however, we should not bother with sandboxing. |
Alright, so... What matters in each case is the provenance of the data loaded into the iframe. Putting aside
In all 3 cases, the iframe should inherit the address space of the parent frame. |
For I think that inheriting from the creator/initiator might also make sense for Finally, want to note that in addition to frames, service worker can also create and navigate windows (e.g. via |
Thanks Lukasz, that's really helpful! I'll take a closer look at that - in particular it seems https://html.spec.whatwg.org/multipage/browsers.html#determining-the-origin is very relevant. |
FWIW, the policy container idea raised in whatwg/html#4926 seems at least somewhat relevant. (It also raises the question of how blob URLs should inherit various policies, which probably should also include their address space) |
Indeed, in fact we are looking to implement correct inheritance for address space in Chromium within the policy container :) |
Alright, having read a bit about the inheritance rules for other policies and such, I believe this would align:
It bothers me somewhat that the determining the origin algorithm in the HTML spec has different logic for |
@hiroshige-g has done some research into inheritance rules across policies: https://docs.google.com/document/d/1CAegq63QY0HMW-66zG4wgawIaWGi33MHtmU3azQQNz8/edit#heading=h.cbj3hy89egsx |
See also w3ctag/design-principles#111, which discusses general inheritance principles. |
Ok, upon doing some more reading of the various related issues, I think this suggestion from the policy container issue makes the most sense: whatwg/html#4926 (comment). Adapting it lightly for our purposes, this yields the following algorithm:
I'll draft a PR. |
Mike has some suggestions for how to patch the specs to define inheritance in the case of |
This issue is fixed by integration with HTML's new policy container, added in 4627c13. |
In the spec, we should explicitly answer the question: when an iframe is embedded in a document in the
local
address space, what should the iframe's address space be?This needs to consider a variety of sources for the iframe's content:
srcdoc
data:
URLs (see issue Should we explicitly define cors-rfc1918 behavior for opaque origins? #17 for a discussion)blob:
URLs (see also issue Address space inheritance for blob URLs #18)javascript:
URLsabout:blank
And possibly more I have not thought of yet.
The text was updated successfully, but these errors were encountered: