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

nosiif in firefox browser #3452

Closed
9 tasks done
ghajini opened this issue Nov 14, 2024 · 13 comments
Closed
9 tasks done

nosiif in firefox browser #3452

ghajini opened this issue Nov 14, 2024 · 13 comments
Labels
Firefox specific to Firefox

Comments

@ghajini
Copy link

ghajini commented Nov 14, 2024

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

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

when i use goflix.sbs##+js(nosiif) on firefox android, it does not log setInterval call

 <script>
        setInterval(function(){
            $("form").submit();
        }, 2000);
    </script>

when i set breakpoint at setInterval , i see the script
Unt

A specific URL where the issue occurs.

https://goflix.sbs/en/mirror/96e887fdaeb95099124dfdae16748ef0

Steps to Reproduce

  1. Add in my filters
goflix.sbs##+js(nosiif)
||goflix.sbs^$document,csp=sandbox allow-same-origin allow-scripts allow-modals allow-orientation-lock allow-pointer-lock allow-presentation allow-top-navigation allow-popups,badfilter
  1. navigate to https://goflix.sbs/en/mirror/96e887fdaeb95099124dfdae16748ef0
  2. ad redirect is seen

Expected behavior

i could see logging in ublock logger & thus foil ad redirect with goflix.sbs##+js(nosiif, /\.submit/, 2000)

Actual behavior

can't see setInterval call being logged

uBO version

1.61

Browser name and version

firefox android 132.0

Operating System and version

android 12

@gorhill
Copy link
Member

gorhill commented Nov 14, 2024

Do you see it when forcing a reload of the page?

@ghajini
Copy link
Author

ghajini commented Nov 14, 2024

i don't see even when forcing reload of the page
i checked with firefox android 132.0 ,firefox android nightly 134.0a1

@gorhill
Copy link
Member

gorhill commented Nov 14, 2024

With Firefox 128, it became possible to inject the scriptlets directly into the MAIN world, so the solution is probably to avoid going through a blob for Firefox 128+.

@uBlock-user
Copy link
Contributor

it became possible to inject the scriptlets directly into the MAIN world

So a website CSP no longer gets applied on uBO's scriptlets ? Because this was the reason the blob: workaround had to be implemented for Firefox.

@ghajini
Copy link
Author

ghajini commented Nov 15, 2024

i want to note the fact that this issue only happens on firefox android browser & NOT on firefox desktop browser/chrome

@uBlock-user uBlock-user added the Firefox-Android specific to Android platform label Nov 15, 2024
@gorhill
Copy link
Member

gorhill commented Nov 15, 2024

I could reproduce on Firefox desktop.

@uBlock-user uBlock-user removed the Firefox-Android specific to Android platform label Nov 15, 2024
@ghajini ghajini changed the title nosiif in firefox android nosiif in firefox browser Nov 15, 2024
gorhill added a commit to gorhill/uBlock that referenced this issue Nov 29, 2024
Related issue:
uBlockOrigin/uBlock-issues#3452

Use blob-based injection only when direct injection fails because
of a page's CSP. This is a mitigation until a better approach is
devised.

Such future better approach to investigate:

- Use `MAIN` world injection supported by contentScript.register()
  since Firefox 128
- Investigate registering script to inject ahead of time thru
  some heuristic
@gorhill
Copy link
Member

gorhill commented Nov 30, 2024

See if gorhill/uBlock@b1a00145bd helps in latest dev build.

@stephenhawk8054
Copy link
Member

I think the update works more reliably for some cases where I needed HTML filtering.

@gorhill
Copy link
Member

gorhill commented Dec 1, 2024

Nothing has changed in the code paths for HTML filtering. The change is essentially that scriptlets are directly injected as in Chromium, and to fallback to blob-based injection if direct injection fails.

@uBlock-user uBlock-user added the Firefox specific to Firefox label Dec 1, 2024
@stephenhawk8054
Copy link
Member

Yeah, I mean I was testing scriptlet solution for those domains, however they didn't work if I refresh multiple times (or click on "Duplicate" the tab) so I resorted to HTML filtering.

The new update makes the scriptlet solution works more stable for me.

@ghajini
Copy link
Author

ghajini commented Dec 5, 2024

firefox android stable/nightly not support ubo dev version installation from github so only test when released to stable

@stephenhawk8054
Copy link
Member

@ghajini Which android version are you using? From android 10 you can install xpi file as extensions. I'm using uBO dev version on my Firefox android right now.

@ghajini
Copy link
Author

ghajini commented Dec 5, 2024

ok i installed latest ubo dev 1.61.3b3 on firefox android as per @stephenhawk8054 idea, fix is working fine for this case as well as some other cases

@ghajini ghajini closed this as completed Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Firefox specific to Firefox
Projects
None yet
Development

No branches or pull requests

4 participants