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 adblocking regression for requests made by Service Workers #13781

Closed
kdzwinel opened this issue Jan 26, 2021 · 2 comments · Fixed by brave/brave-core#7910
Closed

Fix adblocking regression for requests made by Service Workers #13781

kdzwinel opened this issue Jan 26, 2021 · 2 comments · Fixed by brave/brave-core#7910

Comments

@kdzwinel
Copy link

Description

Resource that should be blocked, according to the custom filters, doesn't get blocked when requested by a service worker.

Steps to Reproduce

  1. Go to brave://adblock/
  2. Add ||bad.third-party.site^ to the 'Custom Filters' textarea
  3. Go to https://privacy-test-pages.glitch.me/privacy-protections/request-blocking/
  4. Click "start the test" button

Actual result:

"serviceworker-fetch" test is green meaning that request to https://bad.third-party.site/privacy-protections/request-blocking/block-me/fetch.json?serviceworker-… has been successfully made. This can be additionally verified using DevTools:

not-blocked

Expected result:

All tests should be gray meaning that all requests to bad.third-party.site failed to load.

Brave version (brave://version info)

Brave | 1.19.86 Chromium: 88.0.4324.96 (Official Build) (x86_64)
Revision | 68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS | macOS Version 11.1 (Build 20C69)

Miscellaneous Information:

I haven't verified if this issue only affects custom filters or if it's a more general gap that also affects the default protections.

@antonok-edm antonok-edm added the feature/shields/adblock Blocking ads & trackers with Shields label Jan 28, 2021
@antonok-edm antonok-edm self-assigned this Jan 28, 2021
@antonok-edm antonok-edm added the privacy-pod Feature work for the Privacy & Web Compatibility pod label Jan 28, 2021
@antonok-edm
Copy link
Collaborator

Thanks for the report @kdzwinel and good find. I verified that this also affects the default protections; will work on getting a fix in soon.

@LaurenWags
Copy link
Member

LaurenWags commented Feb 22, 2021

Verified using

Brave	1.21.64 Chromium: 88.0.4324.182 (Official Build) beta (x86_64)
Revision	73ee5087001dcef33047c4ed650471b225dd8caf-refs/branch-heads/4324@{#2202}
OS	macOS Version 10.15.7 (Build 19H512)

Verified test plan from brave/brave-core#7910

Custom Filters Default Filters
1 3
2 4

Verification passed on

Brave 1.21.64 Chromium: 88.0.4324.182 (Official Build) beta (64-bit)
Revision 73ee5087001dcef33047c4ed650471b225dd8caf-refs/branch-heads/4324@{#2202}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#7910
image


Verification passed on


Brave | 1.21.68 Chromium: 89.0.4389.58 (Official Build) (64-bit)
-- | --
Revision | 1a139f28ecc27719439e37c6b1533cee999cb802-refs/branch-heads/4389@{#1134}
OS | Windows 10 OS Version 2004 (Build 19041.804)


Verified test plan from brave/brave-core#7910
image

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

Successfully merging a pull request may close this issue.

6 participants