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

Firefox: uBO logger does not report all the scriptlets #2072

Closed
5 tasks done
ghajini opened this issue Mar 31, 2022 · 23 comments
Closed
5 tasks done

Firefox: uBO logger does not report all the scriptlets #2072

ghajini opened this issue Mar 31, 2022 · 23 comments
Labels
external issue involving an external factor Firefox specific to Firefox

Comments

@ghajini
Copy link

ghajini commented Mar 31, 2022

Prerequisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
  • The issue is not present after wholly disabling uBlock Origin ("uBO") in the browser
  • I checked the documentation to understand that the issue I report is not a normal behavior

I tried to reproduce the issue when...

  • uBO is the only extension
  • using a new, unmodified browser profile

Description

  1. logger doesn't report following filters
vidbam.org##+js(abort-current-script, JSON.parse, break;case $.)
vidshar.org##+js(acis, JSON.parse, break;case $.)

when going here https://4hdmovie.com/movies/valimai-2022-tamil/ in firefox stable

iam not able to see #@# in logger to except the scriptlet filter ,this is how it looks in firefox
firefox_2obNjN4MEA

this is in opera browser
opera_wwZTfTqawz

❌ doesn't appear in filter logger content area in firefox
firefox_XWH6TxoJNN

opera looks like this
opera_csNjoHYWD4

A specific URL where the issue occurs

https://4hdmovie.com/movies/valimai-2022-tamil/

Steps to Reproduce

Going https://4hdmovie.com/movies/valimai-2022-tamil/ and observing logger for above mentioned steps in description

Expected behavior

  1. logger should report
vidbam.org##+js(abort-current-script, JSON.parse, break;case $.)
vidshar.org##+js(acis, JSON.parse, break;case $.)
  1. show #@# next to scriptlet filter when visualized and X in filter logger content area

these are all behaviours reported in chromium based ublock origin

Actual behavior

Doesn't logged scriptlet filters and not shown #@# , X

Configuration

uBlock Origin: 1.41.8
Firefox: 98
filterset (summary):
network: 81322
cosmetic: 42192
scriptlet: 16444
html: 631
listset (total-discarded, last updated):
default:
user-filters: 1-0, never
ublock-filters: 31066-40, 40m
ublock-badware: 3993-3, 40m
ublock-privacy: 210-0, 40m
ublock-abuse: 72-0, 40m
ublock-unbreak: 1753-0, 40m
easylist: 65075-589, 40m
easyprivacy: 26738-577, 40m
urlhaus-1: 9225-0, 40m
plowe-0: 3690-2, 40m
ublock-quick-fixes: 138-4, 40m
filterset (user): [array of 1 redacted]
modifiedUserSettings: [none]
modifiedHiddenSettings: [none]
supportStats:
allReadyAfter: 861 ms (selfie)
maxAssetCacheWait: 353 ms

@gorhill
Copy link
Member

gorhill commented Mar 31, 2022

logger doesn't report following filters

Because there are no iframes for either vidbam.org or vidshar.org. Scriptlets are injected in documents.

iam not able to see #@# in logger to except the scriptlet filter

modifiedHiddenSettings: [none]

filterAuthorMode

doesn't appear in filter logger content area in firefox

Browser behavior -- Firefox does not render a x in its input type="search" elements.

@gorhill gorhill closed this as completed Mar 31, 2022
@gorhill gorhill added the invalid not a uBlock issue label Mar 31, 2022
@ghajini
Copy link
Author

ghajini commented Mar 31, 2022

Because there are no iframes for either vidbam.org or vidshar.org. Scriptlets are injected in documents.

i don't understand this ,there are iframes for vidshar.org/vidbam.org
firefox_bYiNQ96NhS

i agree with 2 and 3rd point

@gorhill
Copy link
Member

gorhill commented Mar 31, 2022

You told me:

when going here https://4hdmovie.com/movies/valimai-2022-tamil/ in firefox stable

It's what I did, I visited the provided URL and there were no frame reported in the logger. If you have a scenario where those frames become present in the DOM, please provide detailed steps to reproduce.

@ghajini
Copy link
Author

ghajini commented Mar 31, 2022

Going here https://4hdmovie.com/movies/valimai-2022-tamil/
click under video sources fast stream & fast stream2 ,logger report frame request
firefox_1YPDaj4vqn
but not scriptlet filter logging...

i think iam pretty much clearer

@gorhill
Copy link
Member

gorhill commented Mar 31, 2022

click under video sources fast stream & fast stream2

Nothing happens when I click those links -- using new Firefox profile with only uBO installed with default settings and up to date lists.

@mapx-
Copy link
Contributor

mapx- commented Mar 31, 2022

Nothing happens when I click those links -- using new Firefox profile with only uBO installed with default settings and up to date lists.

  • fast stream & fast stream2 are frozen using my european ip, then I tried a vpn us ip and are working

  • using us ip fast stream will directly open its embed stream (frame): https://vidshar.org/embed-gwtmm2hrazuv.html

  • fast stream2 => https://vidbam.org/embed-cltmyxvbt4hd.html

  • even without running / play the stream:

chrome => the filter is present in the logger
image

firefox => no such filter in the logger

@mapx- mapx- reopened this Mar 31, 2022
@mapx- mapx- changed the title UBo logger uBO logger Firefox - does not report all the scriptlets Mar 31, 2022
@mapx- mapx- removed the invalid not a uBlock issue label Mar 31, 2022
@mapx- mapx- changed the title uBO logger Firefox - does not report all the scriptlets Firefox: uBO logger does not report all the scriptlets Mar 31, 2022
@gorhill
Copy link
Member

gorhill commented Mar 31, 2022

I tried 2 US VPN and still can't reproduce and links are unresponsive. Might require Windows OS? I don't have this.

@mapx-
Copy link
Contributor

mapx- commented Mar 31, 2022

It's working using a Vancouver, Toronto, Montreal ip too

@ghajini
Copy link
Author

ghajini commented Mar 31, 2022

use browsec vpn(autolocation ,netherland) @gorhill

@gorhill
Copy link
Member

gorhill commented Mar 31, 2022

Scriptlets are injected in a different way in Firefox, declarative content script needs to be injected first in the frames, and when they execute, uBO's content script will ask the main process to inject the scriptlets. If declarative content script is not injected by Firefox, scriptlets won't be injected. In Chromium, uBO might report the scriptlet as injected, but it's not guaranteed it is happening.

I modified how scriptlet injection is reported in the logger in the next dev build: uBO will report scriptlet being injected only if it receives confirmation that the content script code injecting the scriptlets has been executed.

The links are also not functioning when using Chromium, so at this point I suspect the page's code depends on the OS, to be confirmed by someone else who can also test on linux.

gorhill added a commit to gorhill/uBlock that referenced this issue Mar 31, 2022
@ghajini
Copy link
Author

ghajini commented Mar 31, 2022

just an observation i can see evoload.io##+js(abort-on-property-write, _pop) in logger being reported on this link https://4hdmovie.com/movies/hey-sinamika-2022-hindi-hd/

but logger fails to report vidbam.org##+js(abort-current-script, JSON.parse, break;case $.)
vidshar.org##+js(acis, JSON.parse, break;case $.)
here link https://4hdmovie.com/movies/valimai-2022-tamil/

hope iam not offtopic

@ghajini
Copy link
Author

ghajini commented Mar 31, 2022

@gorhill , with ubo 1.42.1b1 ,firefox
i think it broke ,now scriptlets are never reported
test link =any youtube video
Screenshot (305)

@gorhill
Copy link
Member

gorhill commented Mar 31, 2022

I will fix this asap.

@mapx-
Copy link
Contributor

mapx- commented Mar 31, 2022

I installed ubuntu in hyper-v in windows, FF 75, uBO 1.42.1b0, canadian ip, I can get the same behaviour (scriptlet not reported for those 2 players above)

gorhill added a commit to gorhill/uBlock that referenced this issue Mar 31, 2022
@gorhill
Copy link
Member

gorhill commented Mar 31, 2022

Well I am not making this up, nothing happens when I click either of those links:

Screenshot from 2022-03-31 11-54-10

I will leave somebody else who can investigate code deal with this, use mention if ever there is something new of interest to me.


Error messages in Firefox 98.0.2 console in case they are meaningful, this on new browser profile with uBO last dev build with up to date filter lists + NY VPN:

Screenshot from 2022-03-31 12-18-11

@mapx-
Copy link
Contributor

mapx- commented Mar 31, 2022

Toronto ip, FF + uBO 1.42.1b2, still same behaviour (no scriptlet logged for frames)

@ghajini
Copy link
Author

ghajini commented Apr 3, 2022

another website where scriptlets not logged for iframes are

https://x.yesmovies.ws/attack-2021-hd-720p-tamil-movie-watch-online-tamilyogi-net/

these scriptlet(s)

vidshar.org##+js(acis, JSON.parse, break;case $.)
vadbom.com##+js(acis, JSON.parse, break;case $.)

@stephenhawk8054
Copy link
Member

another website where scriptlets not logged for iframes are

https://x.yesmovies.ws/attack-2021-hd-720p-tamil-movie-watch-online-tamilyogi-net/

these scriptlet(s)

vidshar.org##+js(acis, JSON.parse, break;case $.)
vadbom.com##+js(acis, JSON.parse, break;case $.)

Yes, I can confirm with this site

Screenshot

7

@ghajini
Copy link
Author

ghajini commented Apr 4, 2022

@gorhill will you checkup, if this site in comment is accessible for you?
#2072 (comment)

@gorhill
Copy link
Member

gorhill commented Apr 4, 2022

Yes, I can reproduce this with https://x.yesmovies.ws/attack-2021-hd-720p-tamil-movie-watch-online-tamilyogi-net/ -- no interaction needed. It's difficult to investigate but at first glance it appears uBO's content scripts are not injected in those two frames, maybe because they have sandbox attribute set on them. I would have to dig into bugzilla to find out if this is a known issues/normal behavior from Firefox's point of view. If that is the issue, then we will have to resort to HTML filtering if that is possible, otherwise if content scripts can't be injected, then it's not something I can fix in uBO. This requires more investigation though, as I said it's at first glance, it's not easy to investigate through the debugger, I need a custom version of uBO to confirm through console.log messages.

@gorhill
Copy link
Member

gorhill commented Apr 4, 2022

I confirm that uBO's content scripts are not injected by Firefox, this is why the scriptlets are not injected as a consequence.

Top is Chroimum console, bottom is Firefox console:
a

@gwarser gwarser added external issue involving an external factor Firefox specific to Firefox labels Apr 17, 2022
@gwarser gwarser closed this as completed Apr 17, 2022
@ghajini
Copy link
Author

ghajini commented Apr 18, 2022

does this need to be reported to firefox or there's bugzilla issue about it?
@gwarser

@gwarser
Copy link

gwarser commented Apr 21, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external issue involving an external factor Firefox specific to Firefox
Projects
None yet
Development

No branches or pull requests

5 participants