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

Fix $csp rules being applied even when Shields are down #16283

Closed
antonok-edm opened this issue Jun 8, 2021 · 2 comments · Fixed by brave/brave-core#9053
Closed

Fix $csp rules being applied even when Shields are down #16283

antonok-edm opened this issue Jun 8, 2021 · 2 comments · Fixed by brave/brave-core#9053

Comments

@antonok-edm
Copy link
Collaborator

$csp rules, like all adblock filter rules, have some potential of causing webcompat issues. It should be possible to prevent injecting them altogether by bringing Shields down.

@srirambv
Copy link
Contributor

Verification passed on the following devices running 1.25.72 x64 build

OnePlus 6T(Android 10) Samsung Tab A (Android 10)

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jun 11, 2021

Verification passed on


<!--StartFragment-->
Brave | 1.25.72 Chromium: 91.0.4472.101&nbsp;(Official Build)&nbsp;(64-bit)
-- | --
Revision | af52a90bf87030dd1523486a1cd3ae25c5d76c9b-refs/branch-heads/4472@{#1462}
OS | Windows&nbsp;10 OS Version 2004 (Build 19041.985)

<!--EndFragment-->

  • Verified the test plan from Tie CSP rule injection to Shields ads/tracker setting brave-core#9053

  • Verified that the scripts violating the policy script-src 'self' 'unsafe-inline' https://hcaptcha.com *.hcaptcha.com. is shown in the console when Shields are up and ads/trackers blocked setting is the standard - PASSED

  • Verified that the scripts violating the policy script-src 'self' 'unsafe-inline' https://hcaptcha.com *.hcaptcha.com. is shown in the console when Shields are up and ads/trackers blocked setting is aggressive mode - PASSED

  • Verified that the scripts violating the policy script-src 'self' 'unsafe-inline' https://hcaptcha.com *.hcaptcha.com. isn't shown in the console when Shields are down - PASSED

  • Verified that the scripts violating the policy script-src 'self' 'unsafe-inline' https://hcaptcha.com *.hcaptcha.com. isn't shown in the console when Shields ads/trackers are allowed - PASSED

Shield UP - Ads and trackers is Standarad
image
image

Shield UP - Ads and trackers is Aggressive
image
image

Shield Down
image
image

Shield Up - Ads and trackers is Allowed
image
image

Verified that the DuckDuckGo page loads rather than displaying a full white screen
DDG


Verification passed on

Brave 1.25.72 Chromium: 91.0.4472.101 (Official Build) (64-bit)
Revision af52a90bf87030dd1523486a1cd3ae25c5d76c9b-refs/branch-heads/4472@{#1462}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#9053

Verified when Shields are up and ads/trackers blocked setting is set to standard
image

Verified when Shields are up and ads/trackers blocked setting is set to aggressive
image

Verified when shields are down
image

Verified when ads/trackers blocked setting is set to allow all
image

Verified that the DuckDuckGo page loads rather than displaying a full white screen
16251


Verified PASSED using

Brave 1.25.72 Chromium: 91.0.4472.101 (Official Build) (x86_64)
Revision af52a90bf87030dd1523486a1cd3ae25c5d76c9b-refs/branch-heads/4472@{#1462}
OS macOS Version 11.4 (Build 20F71)
  • Verified the test plan from brave/brave-core#9053
  • Verified that the scripts violating the policy script-src 'self' 'unsafe-inline' https://hcaptcha.com *.hcaptcha.com. is shown in the console when Shields are up and ads/trackers blocked setting is the standard - PASSED

Screen Shot 2021-06-11 at 8 29 49 AM

  • Verified that the scripts violating the policy script-src 'self' 'unsafe-inline' https://hcaptcha.com *.hcaptcha.com. is shown in the console when Shields are up and ads/trackers blocked setting is aggressive mode - PASSED

Screen Shot 2021-06-11 at 8 31 36 AM

  • Verified that the scripts violating the policy script-src 'self' 'unsafe-inline' https://hcaptcha.com *.hcaptcha.com. isn't shown in the console when Shields are down - PASSED

Screen Shot 2021-06-11 at 8 31 50 AM

  • Verified that the scripts violating the policy script-src 'self' 'unsafe-inline' https://hcaptcha.com *.hcaptcha.com. isn't shown in the console when Shields ads/trackers are allowed - PASSED

Screen Shot 2021-06-11 at 8 32 08 AM

  • Verified that the duckduckgo local HTML test page opens, rather than displaying a white screen - PASSED
    duckduckgo

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