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

Support overrides to the eTLD+1 exception policy from default adblock filter lists #20426

Closed
antonok-edm opened this issue Jan 10, 2022 · 7 comments · Fixed by brave/brave-core#18829

Comments

@antonok-edm
Copy link
Contributor

antonok-edm commented Jan 10, 2022

The default adblock engine, into which the default Brave filter lists are loaded, is subject to first-party exceptions to improve web compatibility when in standard Shields blocking mode, as per https://brave.com/privacy-updates/9-web-compat-blocking/.

However, there are cases where we can verify that some first-party resources are an invasion of privacy, cause excessive CPU load, or are otherwise harmful to users and do not break pages - in this case we'd like a way to override the first-party exception policy, and ensure that those requests are blocked anyways in standard Shields mode.

This can be accomplished by loading some filters into a separate adblock engine without the first-party exceptions.

@antonok-edm antonok-edm added enhancement OS/Android Fixes related to Android browser functionality OS/Desktop labels Jan 10, 2022
@antonok-edm antonok-edm self-assigned this Jan 10, 2022
@antonok-edm antonok-edm added the feature/shields/adblock Blocking ads & trackers with Shields label Jan 10, 2022
@pes10k pes10k added the privacy-pod Feature work for the Privacy & Web Compatibility pod label Jan 10, 2022
@antonok-edm
Copy link
Contributor Author

Now that the adblock engines are merged (#5461), this should be significantly easier to implement. We can create a new component in https://github.com/brave/brave-core-crx-packager to host the list in plaintext format, then use a new AdBlockComponentFiltersProvider similar to the default filters provider to load the list in the browser. Unlike the default filters provider, however, this new provider will be registered with the AdBlockFiltersProviderManager so that it can be loaded into the additional_filters_engine_ rather than the default_engine_.

@LaurenWags
Copy link
Member

@antonok-edm once the component mentioned in the test plan loads, are there additional steps we should take to verify it's working? For example, are there any sites we should check specifically?

@antonok-edm
Copy link
Contributor Author

You can check https://www.the-scientist.com/ - there should be no blank bottom bar like there is on Release at the moment.

@stephendonner
Copy link

Verified PASSED using

Brave | 1.54.85 Chromium: 115.0.5790.56 (Official Build) beta (x86_64)
-- | --
Revision | ebcfb87c1393f36955cfa2f6451a1767e3dc3ee5-refs/branch-heads/5790@{#1193}
OS | macOS Version 11.7.8 (Build 20G1351)

Steps:

  1. installed 1.54.85
  2. launched Brave
  3. loaded https://www.the-scientist.com/
  4. noted site in Standard blocking mode
  5. switched to Aggressive blocking mode and noted site
  6. compared to 1.52.129

Confirmed the following:

  • no blank space in either Aggressive or Standard blocking modes
  • Brave Ad Block First Party Filters shows version Version: 1.0.6 in brave://components
  • blank space was seen in 1.52.129, in Standard mode

1.54.85

Aggressive Standard brave://components
Screen Shot 2023-07-01 at 3 07 23 PM Screen Shot 2023-07-01 at 3 07 32 PM Screen Shot 2023-07-01 at 3 07 08 PM

1.52.129

Aggressive Standard
Screen Shot 2023-07-01 at 2 55 05 PM Screen Shot 2023-07-01 at 2 56 21 PM

@LaurenWags LaurenWags added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Aug 7, 2023
@LaurenWags
Copy link
Member

LaurenWags commented Aug 7, 2023

Verified with

Brave	1.57.36 Chromium: 115.0.5790.171 (Official Build) beta (64-bit) 
Revision	a4bb683f14dc402f5da13707e13559dc4d5ef08b
OS	Linux

Steps:

  1. installed 1.57.x
  2. launched Brave
  3. loaded https://www.the-scientist.com/
  4. noted site in Standard blocking mode
  5. switched to Aggressive blocking mode and noted site
  6. compared to 1.56.x

Confirmed the following:

  • no blank space in either Aggressive or Standard blocking modes
  • Brave Ad Block First Party Filters shows version Version: 1.0.19 in brave://components
  • blank space was seen in 1.56.14, in Standard mode

1.57.36

Aggressive Standard brave://components
1 57 agg 1 57 std 1 57

1.56.14

Aggressive Standard
1 56 agg 1 56 std

@LaurenWags LaurenWags added QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Aug 7, 2023
@hffvld hffvld added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Aug 7, 2023
@hffvld
Copy link
Contributor

hffvld commented Aug 7, 2023

Verified on Pixel 2 XL, Galaxy Tab S8 and Pixel 7 using version(s):

Device/OS: 
- Pixel 2 XL [taimen-user  8.1.0 OPM2.171026.006.H1 release-keys]
- Galaxy Tab S8 [gts8wifixx-user 13 TP1A.220624.014 release-keys]
- Pixel 7 [panther_beta-user 14 UPB4.230623.007 release-keys]
Brave build: 1.57.35
Chromium: 115.0.5790.171 (Official Build) beta (64-bit) 
Revision: 776897328898241b35b83878040730e73e749c06

STEPS:

  1. Launch Brave
  2. Open https://www.the-scientist.com/
  3. Confirm/set Bloack trackers & ads in Brave shields to Standard Mode > Verify
  4. Switch Bloack trackers & ads to Aggressive Mode > Verify

ACTUAL RESULTS:

  • Verified that no blank space was observed in Standard and Aggressive Mods of Bloack trackers & ads
  • Verified that Brave Ad Block First Party Filters shows version Version: 1.0.19 in brave://components

Android 8 [phone]

1 2 3
1 2 3

Android 13 [tablet]

1 2 3
1 2 3

Android 14 [phone]

1 2 3
1 2 3

@hffvld hffvld added QA Pass - Android ARM QA Pass - Android Tab QA Pass - Android 8+ and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Aug 7, 2023
@MadhaviSeelam
Copy link

Verification PASSED using

Brave | 1.57.41 Chromium: 115.0.5790.171 (Official Build) beta (64-bit)
-- | --
Revision | adc7e3e2defac3f9b39cb22bcbb354b72b74c2eb
OS | Windows 11 Version 22H2 (Build 22621.1992)

Steps:

  1. installed 1.57.41
  2. launched Brave
  3. loaded https://www.the-scientist.com/
  4. noted site in Standard blocking mode
  5. switched to Aggressive blocking mode and noted site
  6. compared to 1.56.x

Confirmed the following:

  • no blank space in either Aggressive or Standard blocking modes
  • Brave Ad Block First Party Filters shows version Version: 1.0.20 in brave://components
  • blank space was seen in 1.56.20, in Standard mode

1.57.41

Aggressive Standard brave://components
image image image

1.56.20

Aggressive Standard
image 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.

7 participants