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

Adblock rules should apply to HTTP subresources of an IPFS page #13742

Closed
bbondy opened this issue Jan 24, 2021 · 1 comment · Fixed by brave/brave-core#7692
Closed

Adblock rules should apply to HTTP subresources of an IPFS page #13742

bbondy opened this issue Jan 24, 2021 · 1 comment · Fixed by brave/brave-core#7692

Comments

@bbondy
Copy link
Member

bbondy commented Jan 24, 2021

Description

Applying adblock rules to IPFS doesn't work well because CIDs will often have path based fragments that are used in ABP filter syntax. However it should apply to HTTP(S) subresources of an IPFS page.

This issue should be fixed after: #10220

Steps to Reproduce

  1. Navigate to an IPFS page and open up the JS console
  2. Type in this script:
var script = document.createElement('script')
script.src = 'https://brianbondy.com/static/js/analytics.js'
document.body.appendChild(script)
  1. The resource should be blocked.

Actual result:

The resource is not blocked.

Expected result:

The resource should be blocked and the block count should increase by 1.

Reproduces how often:

Always

Brave version (brave://version info)

1.21.x and below (all before this is fixed)

Version/Channel Information:

  • Can you reproduce this issue with the current release? yes
  • Can you reproduce this issue with the beta channel? yes
  • Can you reproduce this issue with the nightly channel? yes
@bbondy bbondy self-assigned this Jan 24, 2021
@bbondy bbondy added the priority/P3 The next thing for us to work on. It'll ride the trains. label Jan 24, 2021
@bbondy bbondy added this to the 1.21.x - Nightly milestone Jan 31, 2021
@stephendonner
Copy link

stephendonner commented Feb 13, 2021

Verified FIXED using

Brave 1.21.51 Chromium: 88.0.4324.152 (Official Build) beta (x86_64)
Revision 6579930fc53b4dc589c042bec9d0a3778326974d-refs/branch-heads/4324@{#2106}
OS macOS Version 11.2.1 (Build 20D74)

Screen Shot 2021-02-12 at 10 34 56 PM

Before the fix, with the inline testcase, on

Brave 1.20.103 Chromium: 88.0.4324.152 (Official Build) (x86_64)
Revision 6579930fc53b4dc589c042bec9d0a3778326974d-refs/branch-heads/4324@{#2106}

the script resource isn't blocked. It is using 1.21.51, with the following message:

GET https://brianbondy.com/static/js/analytics.js net::ERR_BLOCKED_BY_CLIENT


Verification passed on

Brave 1.21.52 Chromium: 88.0.4324.152 (Official Build) dev (64-bit)
Revision 6579930fc53b4dc589c042bec9d0a3778326974d-refs/branch-heads/4324@{#2106}
OS Ubuntu 18.04 LTS

Verified test plan from the description
Verified the script is blocked when Shields are enabled
image
Verified the number of Trackers and ads blocked is increased
image

Logged #14147 when shields are disabled, the resources are blocked anyway.


Verification passed on

Brave | 1.21.56 Chromium: 88.0.4324.152 (Official Build) dev (64-bit)
-- | --
Revision | 6579930fc53b4dc589c042bec9d0a3778326974d-refs/branch-heads/4324@{#2106}
OS | Windows 10 OS Version 2004 (Build 19041.804)

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.

4 participants