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

acis scriptlet and document.documentElement #2670

Open
6 tasks done
halt76 opened this issue May 24, 2023 · 27 comments
Open
6 tasks done

acis scriptlet and document.documentElement #2670

halt76 opened this issue May 24, 2023 · 27 comments
Labels
bug Something isn't working fixed issue has been addressed

Comments

@halt76
Copy link

halt76 commented May 24, 2023

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

The zoro.to player is broken.
Also, thumbnails are no longer displayed.
js(acs, document.documentElement, Break;case $.) seems to be the culprit.

URL(s) where the issue occurs.

https://zoro.to/

Screenshot(s)

No response

Notes

No response

Configuration

uBlock Origin 1.49.3rc1:
 since: 1h.28m
Firefox: 114
filterset (summary):
 network: 95719
 cosmetic: 49770
 scriptlet: 20900
 html: 1102
listset (total-discarded, last-updated):
 added:
  ublock-annoyances: 5035-4, 1h.27m
 default:
  user-filters: 1-0, never
  ublock-filters: 34020-165, 1h.28m
  ublock-badware: 7119-1, 1h.28m
  ublock-privacy: 422-0, 1h.27m
  ublock-unbreak: 2028-2, 1h.27m
  ublock-quick-fixes: 304-0, 1h.27m
  easylist: 66390-613, 1h.27m
  easyprivacy: 31845-634, 1h.27m
  urlhaus-1: 6774-1, 1h.27m
  plowe-0: 3735-2, 1h.27m
  JPN-1: 11404-11, 1h.27m
filterset (user): [array of 1 redacted]
userSettings:
 contextMenuEnabled: false
 showIconBadge: false
hiddenSettings: [none]
supportStats:
 allReadyAfter: 834 ms (selfie)
 maxAssetCacheWait: 396 ms
@stephenhawk8054
Copy link
Member

Does this fix it for you?

zoro.to#@#^script:has-text(break;case $.)

@ghajini ghajini added the unable to reproduce cannot reproduce the issue label May 24, 2023
@MasterKia MasterKia changed the title zoro.to player is broken zoro.to: breakage May 24, 2023
@halt76
Copy link
Author

halt76 commented May 24, 2023

yes.
can you fix the default filters?

@ghajini
Copy link

ghajini commented May 24, 2023

would you try stable build of ubo?

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented May 24, 2023

Hmm... right, somehow dev build breaks the site with HTML filtering. Stable works fine. Anyone else can reproduce?

@ghajini ghajini removed the unable to reproduce cannot reproduce the issue label May 24, 2023
@mapx-
Copy link

mapx- commented May 24, 2023

yes, is broken in the last dev build

@ghajini
Copy link

ghajini commented May 24, 2023

@gorhill , html filtering on this site breaks site in ubo dev build 1.49.3c1

stable build of ubo works

@mapx- mapx- transferred this issue from uBlockOrigin/uAssets May 24, 2023
@halt76
Copy link
Author

halt76 commented May 24, 2023

ah...
was it ubo's problem...

@gorhill
Copy link
Member

gorhill commented May 24, 2023

html filtering on this site breaks site in ubo dev build 1.49.3c1

Works fine for me, with that filter, thumbnails are shown and player plays fine. Actually even without that filter I don't see breakage.


Never mind, I get it, it's an exception filter, I can reproduce breakage.


b16 works fine, b19 fails.

@ghajini
Copy link

ghajini commented May 24, 2023

URL= https://zoro.to/home or any video

Filter = zoro.to##^script:has-text(break;case $.) in ublock filters

issue = thumbnails are broken, in above url ,also video doesn't start

ubo version = 1.49.3c1

firefox stable

normal stable build 1.49.2 , no breakages,

only dev build 1.49.3c1 suffers

@gorhill
Copy link
Member

gorhill commented May 24, 2023

Can you guys confirm it works if using this exception filter?

zoro.to#@#+js(abort-current-script, document.documentElement, break;case $.)

I can systematically break/fix by toggling the filter above, so it's not directly related to HTML filtering. I think what is happening is that with the latest code, document.documentElement may not exist yet when a scriptlet execute, and that is causing an issue when trying to trap it as that filter above does.

@stephenhawk8054
Copy link
Member

zoro.to#@#+js(abort-current-script, document.documentElement, break;case $.)

Yup, it works for me

gorhill added a commit to gorhill/uBlock that referenced this issue May 24, 2023
@halt76
Copy link
Author

halt76 commented May 24, 2023

1.49.3rc2 seems to work fine.

@uBlock-user uBlock-user added bug Something isn't working fixed issue has been addressed labels May 24, 2023
@MasterKia MasterKia changed the title zoro.to: breakage acis scriptlet and document.documentElement Aug 16, 2023
@MasterKia
Copy link
Member

MasterKia commented Aug 16, 2023

There seems to be a bug when using document.documentElement.

1- Using Firefox, open the logger and go to https://isaidub3.co/
2- See propeller requests:

isaidub3.co    ​head    ​xhr    ​https://random_domain.com/

3- Add this then visit the page again:

isaidub3.co##+js(acs, document.documentElement, break;case $., , log, 1)

4- No more propeller requests. In console, I see [uBO] matched script text + Uncaught ReferenceError: _zpzya is not defined.

5- Navigate the website (e.g. the "Download now" links)

6- There are propeller requests again. In console instead of those two logs, I only get: Uncaught (in promise) undefined

Same exact behavior with aost:

isaidub3.co##+js(aost, document.documentElement, inlineScript, log, 1)

Same behavior with AdGuard + acis + Firefox.
No problem on Chromium.

@MasterKia MasterKia reopened this Aug 16, 2023
@gorhill
Copy link
Member

gorhill commented Aug 16, 2023

I could reproduce once, on the first try, but after this when I was ready to investigate, I can't reproduce anymore after trying over and over.

@MasterKia
Copy link
Member

I can also reproduce using these:

isaidub3.co##+js(acs, document.createElement, break;case $., , log, 1)
isaidub3.co##+js(acs, document.body, break;case $., , log, 1)

So it may not be related to document.documentElement per se.

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Aug 22, 2023

Currently when I open https://www.nicekkk.com/mij/korean-tv-girl (NSFW), the logger says the filter `

##+js(abort-current-script, decodeURIComponent, 'shift')

could not be found in any of the currently enabled filter lists although it's in ublock filters - ads list: https://github.com/uBlockOrigin/uBlock-issues/assets/66517106/78027186-2484-470a-9e84-e23baaad6e86

Not sure if it's related to the quotation? The filter in ublock filters - ads list is

nicekkk.com##+js(acs, decodeURIComponent, "'shift'")

Tested with dev build b23. Steps to reproduce:

  1. Force update all filter lists
  2. Open logger and access https://www.nicekkk.com/mij/korean-tv-girl

@garry-ut99
Copy link

garry-ut99 commented Aug 25, 2023

MasterKia : #2670 (comment) : There seems to be a bug
MasterKia : #2670 (comment) : I can also reproduce using these:

Can't reproduce (tried many times).


stephenhawk8054 : #2670 (comment) : could not be found in any of the currently enabled filter lists

I can reproduce. Many similar "reverse-lookup fails" bugs from the past:
https://github.com/uBlockOrigin/uBlock-issues/issues?q=is%3Aissue+in%3Atitle+reverse-lookup+sort%3Aupdated-desc+NOT+compressed

@gorhill
Copy link
Member

gorhill commented Aug 25, 2023

I know what the issue is for the failed reverse lookup, it's the quotes around the parameter "'shift'".

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Aug 25, 2023

Ah I see, so it's not related to acs issue.

@gorhill
Copy link
Member

gorhill commented Jan 30, 2024

isaidub3.co is dead, I don't know what is the issue I have to investigate.

https://zoro.to/home is also dead, redirects to a copyright-related announcement.

Also, the "could not be found in any of the currently enabled filter lists" issue should be fixed in current dev cycle, gorhill/uBlock@49dd68ef3d.

@ghajini
Copy link

ghajini commented Jan 31, 2024

#2670 (comment)
such an issue can be reproduced at this related site also
https://share.filesh.site/view-download.php?name=RFNQICgyMDIyKSBIRFJpcCA3MjBwLm1wNA==&link=aHR0cHM6Ly9jYS5vcGVuZmlsZS5vbmxpbmUvZGxvYWQvZGwucGhwP3Q9MnRMWk40Y2tTNzBKQkVMQ0FEMGxQZyZlPTE3MDY3MzI3NTkmZj1MMlpwYkdWekwxUmhiV2xzSUUxdmRtbGxjeTlVWVcxcGJDQXlNREl5SUUxdmRtbGxjeTlFVTFBZ0tESXdNaklwTDBSVFVDQW9NakF5TWlrZ1NFUlNhWEF2UkZOUUlDZ3lNREl5S1NCSVJGSnBjQ0EzTWpCd0xtMXdOQT09

STR =

  • on chrome
    add share.filesh.site##+js(acs, document.documentElement, break;case $.) to ublock
  • navigate to site,don't open devtools
  • propeller script is aborted
  • refresh the page, now its back
  • when you keep opened devtools & refresh page, filter works always
  • now close devtools, clear cookies/data
  • load page again, 1st time aborted, in successive reloads filter does not work

@gorhill
Copy link
Member

gorhill commented Jan 31, 2024

I refreshed many time (devtools not opened), and I couldn't reproduce with uBO 1.55.1b26 and Chromium 120 -- to be sure at the end I disabled the filter and refreshed to see the difference:

Logger output

image

@ghajini
Copy link

ghajini commented Feb 1, 2024

this is reproducible on firefox also but i can use there share.filesh.site##^script:has-text(break;case $.) to fix

ghajini added a commit to uBlockOrigin/uAssets that referenced this issue Feb 1, 2024
@MasterKia
Copy link
Member

uBlockOrigin/uAssets@5ad4712#commitcomment-138647612:

@ftc2: garagejournal.com##+js(acs, JSON.parse, AdBlock): sometimes works for me, but navigating around by clicking on links or going back/forward in history can make it appear
https://www.garagejournal.com/forum/

MasterKia referenced this issue in uBlockOrigin/uAssets Feb 15, 2024
@D4niloMR
Copy link

I have a site which is pretty easy to reproduce uBlockOrigin/uAssets@6110936


I see a very consistent behaviour of not aborting when the devtools are opened.

Same with the exact filter replaced with aopr/aopw/aost.


Needs to add /console-ban.min.js in "My filters" to stop the 3p anti devtools.


STR:

  1. Add /console-ban.min.js and the three filters added here uBlockOrigin/uAssets@6110936 in "My filters"
  2. Open redecanais.zip on Firefox - without ublock annoyances.
  3. Open the devtools and press F5.
  4. Try to select or right-click something, if it worked refresh until you can't. 5/7 times at most.

Same STR with aopr/aopw/aost.

@ghajini
Copy link

ghajini commented Mar 15, 2024

moviesda9.co

firefox /firefox android stable
ubo 1.56

add

moviesda9.co##+js(acs, Object.defineProperty, break;case $.)
moviesda9.co#@#^script:has-text(;}}};break;case $.)
moviesda9.co#@#+js(acs, Object.defineProperty, ;}}};break;case $.)
  • navigate to moviesda9.co
  • on homepage filter works
  • click few links
  • after 4-5 clicks of links filter moviesda9.co##+js(acs, Object.defineProperty, break;case $.) does not work, popups arises

so its abort-current-inline-script issue specifically
website changes frequently so its not limited to 1 website

@garry-ut99
Copy link

garry-ut99 commented Mar 20, 2024

I spent some time analysing it:

website changes frequently so its not limited to 1 website

moviesda9.co now redirects to :
moviesda0.com


moviesda9.co##+js(acs, Object.defineProperty, break;case $.)

Still popups even in AdGuard for Browser with the same filter, which means the issue occurs not only in uBO:
moviesda0.com#%#//scriptlet('abort-current-inline-script', 'Object.defineProperty', 'break;case $.')


This still has popups in uBO: moviesda0.com##+js(acs, Object, break;case $.)
but this works: moviesda0.com##+js(acs, Object)
I'm not saying to add it to filters, it's not my point here, because it's too broad, too risky and aborts too early, thus adding it doesn't have much sense, I'm just showing it as an example and discussing the current issue here, also in AdGuard for Browser, the same filter causes browser tab freeze, someone needs to investigate with profiler : moviesda0.com#%#//scriptlet('abort-current-inline-script', 'Object')


so its abort-current-inline-script issue specifically

It would indicate that it might be still this issue:

but now I'm not sure, because even with the following filters, popups still appear,
which would indicate issue with so many scriptlets, which is hard to believe:

moviesda0.com##+js(aopr, Object.defineProperty)
moviesda0.com##+js(aopw, Object.defineProperty)
moviesda0.com##+js(set, Object.defineProperty, noopFunc)

Or maybe the issue is just a race condition,
Or the website uses some hackery/tricks,
Or the issue with both adblockers: uBO & AG

ghajini referenced this issue in uBlockOrigin/uAssets Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

9 participants