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: Consider dot-prefix domains for wildcard matching #513

Closed
007 opened this issue Apr 5, 2016 · 1 comment
Closed

CSP: Consider dot-prefix domains for wildcard matching #513

007 opened this issue Apr 5, 2016 · 1 comment

Comments

@007
Copy link

007 commented Apr 5, 2016

As it stands, it seems that I need to explicitly add example.com and cdn.example.com as separate entries in CSP headers. Any subsequent subdomains could use *.example.com for matching, but the *. prefix doesn't match a domain with no prefix.

I'm not sure the exact fix (or if the spec is even changeable), but I'd like to see the preceeding . as implicit for bare domains, sort of like the trailing dot is part of the SOA / zone records in DNS. That would let the *.example.com match both the bare domain and any subdomains, without requiring two separate rules to implement.

*example.com would work too, but only if the implicit-dot is part of the parser. If not, evilexample.com would be a terrible security hole.

@annevk
Copy link
Member

annevk commented Apr 24, 2018

Moved to w3c/webappsec-csp#304.

@annevk annevk closed this as completed Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants