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

Domain restrictions semantics #1113

Closed
ameshkov opened this issue Sep 9, 2019 · 3 comments
Closed

Domain restrictions semantics #1113

ameshkov opened this issue Sep 9, 2019 · 3 comments
Assignees
Milestone

Comments

@ameshkov
Copy link
Member

ameshkov commented Sep 9, 2019

If the following conditions are true:

  • pattern === ANY_URL
  • domain restriction is not empty
  • resource type ===(SUB)DOCUMENT

Then use the host of the request URL to check domain restrictions.

Test rules:

  • $csp=script-src 'none',domain=example.org
  • $cookie=test,domain=example.org
In the case when there's no "source" hostname, `$domain` should be checked against the request's host.
@sxgunchenko
Copy link

core/pull-requests/1500

@sxgunchenko
Copy link

sxgunchenko commented Sep 18, 2019

Testing instructions:

  1. add the following rule: *$empty,domain=google.com
  2. open in browser google.com
  3. check that page is blank (to ensure the correctness of procedure, check that the request to google.com has no referrer)

@sxgunchenko
Copy link

core/pull-requests/1541

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

No branches or pull requests

4 participants