AdguardTeam / AdguardBrowserExtension

AdGuard browser extension
https://adguard.com/
GNU General Public License v3.0
3.07k stars 329 forks source link

Referrer hidden even when rule unblocks it #2648

Closed BlazDT closed 6 months ago

BlazDT commented 10 months ago

AdGuard Extension version

4.2.240

Browser version

Chrome 120.0.6099.110

OS version

Windows 11

What filters do you have enabled?

AdGuard Base filter

What Stealth Mode options do you have enabled?

Block trackers, Remove tracking parameters, Hide your search queries, Send websites signals not to track you, Self-destruction of third-party cookies, Hide Referrer from third parties, Remove X-Client-Data header, Disable WebRTC

Issue Details

https://venushd.click/live/stream-21.php

This website shows error: Referrer check failed, null referrer not allowed

This rule should disable every stealth option: @@||*.*$stealth,important

When I manually disable referrer option in stealth option it works. It also works when I block their script via this rule: ||weblivehdplay.ru/blast.js

Expected Behavior

Rule disables every stealth mode

Screenshots

image

Additional Information

You have to unblock the mentioned script file with rule (or disable base filter): @@||weblivehdplay.ru/blast.js

BlazDT commented 10 months ago

@AdamWr did you experience this issue in the past already?

AdamWr commented 10 months ago

No, I didn't and I cannot reproduce it with version 4.2.228 (in Opera and Firefox).

As far as I can see, 4.2.240 is a new version - https://github.com/AdguardTeam/AdguardBrowserExtension/releases/tag/v4.2.240-beta, marked as beta, though in Chrome and in Edge I have stable version installed and it's already updated to version 4.2.240. In changes there is Remove referrer from the document.referrer - https://github.com/AdguardTeam/AdguardBrowserExtension/issues/1844, I'm not sure, but I suppose that it may be related to this issue.

I think that if there is an exclusion with $stealth modifier then hideDocumentReferrer function should be disabled. https://github.com/AdguardTeam/tsurlfilter/blob/c0ea1cad19c2d45f99bb6ef0b58818fdfffe9ef8/packages/tswebextension/src/lib/common/stealth-helper.ts#L36-L50

BlazDT commented 10 months ago

var _0x2c4597 = document.referrer; if (typeof _0x2c4597 === "undefined" || !_0x2c4597) { window.alert("Referrer check failed, null referrer not allowed"); throw new Error("Referrer check failed"); }

This part is causing the error on that site (i replace bgbody with window.alert). Though when I add a rule to show document.referrer in a window.alert it shows something.

ATM the site seems to be broken (jquery loading error even though file is loading). Still strange it worked with referrer option disabled. Just checked the site without any adblockers and error was displayed too. So probably site issue and beta issue.

Yuki2718 commented 8 months ago

Same issue on https://jra.webcdn.stream.ne.jp/web/jra/onetag2020/eqPcPlayer2.html?target=202401060711 (probably geo-restricted). Even @@||stream.ne.jp^$stealth doesn't work, I have to turn the feature off to make the player work.

stanislav-atr commented 8 months ago

@Yuki2718, could you please elaborate on how to access the player? Direct link is not working for me

Screenshot: ![image](https://github.com/AdguardTeam/AdguardBrowserExtension/assets/68852737/1c1f2608-0331-4e25-8c08-bea2daa67ddb)

Yuki2718 commented 8 months ago

@stanislav-atr Whoops, sorry. Here the STR:

Screenshots Access `https://www.jra.go.jp/`. ![jra1](https://github.com/AdguardTeam/AdguardBrowserExtension/assets/58900598/3123785e-d8cc-49db-be93-c8e5501d3f95) ![jra2](https://github.com/AdguardTeam/AdguardBrowserExtension/assets/58900598/ed385da4-2cd3-4bf8-8f7a-e5214c24b1fa) ![jra3](https://github.com/AdguardTeam/AdguardBrowserExtension/assets/58900598/521f1d07-110f-4530-9577-d03359db0f5a)
stanislav-atr commented 8 months ago

@Yuki2718, thanks for the str, what version is this? @@||stream.ne.jp^$stealth works fine on v4.3.10

Yuki2718 commented 8 months ago

what version is this?

4.2.241. Confirmed it's fixed in 4.3.11