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

Consider restricting to secure contexts #146

Open
jeremyroman opened this issue Jun 10, 2019 · 2 comments
Open

Consider restricting to secure contexts #146

jeremyroman opened this issue Jun 10, 2019 · 2 comments
Labels
design work needed An acknowledged gap in the proposal that needs design work to resolve

Comments

@jeremyroman
Copy link
Collaborator

Based on feedback from @annevk.

We could consider promoting the use of TLS (and further limiting the attack surface slightly) by limiting the feature to secure contexts. This would permit use on HTTPS and, if the UA wishes, loopback HTTP and local file: URLs, but not to unsecured HTTP.

See also https://w3c.github.io/webappsec-secure-contexts/

One point raised in favour of this is that it's easier to remove this restriction retroactively than to add it.

@lucasgadani
Copy link
Collaborator

Does this means that both the tag would only be available in HTTPS contexts, as well as portal browsing contexts only being able to navigate to HTTPS contexts?

What would happen if the parser encounters a tag from a non-secure context? Would we just default to HTMLUnknownElement in that situation?

@jeremyroman
Copy link
Collaborator Author

Does this means that both the tag would only be available in HTTPS contexts, as well as portal browsing contexts only being able to navigate to HTTPS contexts?

That symmetry seems kinda natural given the existence of adoptPredecessor, yeah. Though would we also want to ban redirects through plaintext HTTP, or simply only commit responses that are potentially trustworthy?

What would happen if the parser encounters a tag from a non-secure context? Would we just default to HTMLUnknownElement in that situation?

It's a fair question. On the Chromium side recently our branching in HTMLPortalElement::Create was actually torn out in favour of a specific "enabled-by-feature-flag" thing, so this would require adding an additional condition in there.

The alternative, which I think I'd prefer, would be to simply refuse to load a BC inside an HTMLPortalElement that's not in a secure context, in a similar way to what happens if you try to load a BC in a nested browsing context.

@domenic domenic added the design work needed An acknowledged gap in the proposal that needs design work to resolve label May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design work needed An acknowledged gap in the proposal that needs design work to resolve
Projects
None yet
Development

No branches or pull requests

3 participants