brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17k stars 2.21k forks source link

Weird issue: FB Purity doesnt block sponsored posts on facebook when Shields is turned on but does when its turned off... any ideas why? #36666

Open st333v opened 4 months ago

st333v commented 4 months ago

Description

when brave shields is turned on for facebook, the fb purity browser extension cant block facebook's sponsored posts, but when shields is turned off, it starts working again.

it seems to be something to do with getting image data from a Canvas html element. anyone have any ideas whats going on, or how to fix the code when shields is turned on?

Steps to Reproduce

  1. install fb purity https://chromewebstore.google.com/detail/fluff-busting-purity/nmkinhboiljjkhaknpaeaicmdjhagpep
  2. login to or just open facebook.com if you are already logged in
  3. with brave shields turned on for facebook, scroll the newsfeed down a while, and you will likely see many sponsored posts.
  4. now turn Brave shields off for facebook (via the lion button in the toolbar)
  5. now reload the page and scroll the newsfeed down and you will see the sponsored posts should be gone, or if they haven't, select the "3 dot" / "..." menu at the top right of the post, then select "Zap the Ads", and it will then tell you to reload the page, and after that the Sponsored Posts should be gone.

Actual result:

see sponsored posts with brave shields turned on

Expected result:

don't see sponsored posts with shields turned on

Reproduces how often:

the bad result is reproduced whenever shields is on

Brave version (brave://version info)

Version 1.63.169 Chromium: 122.0.6261.111 (Official Build) (32-bit)

Version/Channel Information:

haven't tried it on any other channels

Other Additional Information:

st333v commented 3 months ago

i did a bit of digging, and found the answer to why the issue is happening with the Shields function turned on, it seems brave is sending out phony data, when Canvas API calls are made with an aim to defeat browser fingerprinting, but unfortunately its also affecting the adblocking capability of fbp

K-6R commented 3 months ago

i did a bit of digging, and found the answer to why the issue is happening with the Shields function turned on, it seems brave is sending out phony data, when Canvas API calls are made with an aim to defeat browser fingerprinting, but unfortunately its also affecting the adblocking capability of fbp

Can confirm. While keeping the rest of the Shields features on and selecting only Allow Fingerprinting, then FBP works as intended. Note to Brave crew: Would still be a nice compliment to Brave if you could somehow exempt FBP. Same mission after all. ;)

rebron commented 3 months ago

cc: @antonok-edm @ryanbr