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

Update browser button to reflect sitepolicy #564

Merged

Conversation

@IAmThePan
Copy link
Contributor

@IAmThePan IAmThePan commented Jun 4, 2020

  • Have you followed the guidelines in CONTRIBUTING.md?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do?
  • Does your submission pass tests?
  • Did you lint your code prior to submission?

Fact: You can set a Whitelist or Blacklist policy to have wildcards (*).
Question: What happens if you trust a site (vox.com) and restrict a wildcard (*.com) that conflicts?
Answer: According to getSitePolicy in src/classes/Policy.js we check and return the restrict criteria before the trust criteria. Therefore it will restrict the site. This is true even if we swap the trust/restrict policies.
Conclusion: That is all fine and I am not changing any of the above facts.

I am changing the Browser Button Blue/Grey status to reflect the site policy. Previously it only checked whether the site was on the Whitelist and not whether it was also on the Blacklist. I have fixed this so the Browser Button correctly represents the Site Policy (and doesn't show grey if there is both a trust and restrict policy for the site).

@IAmThePan IAmThePan requested review from zarembsky and ghostery/ghostery as code owners Jun 4, 2020
@christophertino christophertino added this to the 8.5.2 milestone Jun 15, 2020
@christophertino christophertino merged commit ceded49 into ghostery:develop Jun 15, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@IAmThePan IAmThePan deleted the IAmThePan:feature/wildcard-trust-restrict branch Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants