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

CSP: host-part does not account for IPv6 addresses #49

Closed
Rob--W opened this issue Aug 19, 2014 · 2 comments
Closed

CSP: host-part does not account for IPv6 addresses #49

Rob--W opened this issue Aug 19, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@Rob--W
Copy link
Member

Rob--W commented Aug 19, 2014

The CSP specification does not mention IP addresses as all.

Unlike IPv4, IPv6 addresses does not fit in the current host-part rule. Could you either specify that the CSP is not intended for IP addresses, or include IPv6 addresses in the specification?

The IPv6 format is described in https://tools.ietf.org/html/rfc4291#section-2.2

@hillbrad
Copy link
Contributor

This behavior is deliberately undefined and unsupported. In practice, meaningful construction of web applications relying on the security properties of web origins using IP addresses is just not done. I don't believe such are well supported by CORS, cross-origin messaging or other parts of the broad HTML5 spec set.

@hillbrad hillbrad added the CSP label Oct 27, 2014
@hillbrad
Copy link
Contributor

Mike West notes that we allow IPv4 but do not validate them in any way, would need to add brackets and colons to the valid http://www.w3.org/TR/CSP2/#host-part production rule to similarly accommodate IPv6 addresses.

@hillbrad hillbrad added this to the CSP 2 milestone Oct 27, 2014
mikewest added a commit that referenced this issue Oct 27, 2014
mozfreddyb pushed a commit to mozfreddyb/webappsec that referenced this issue Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants