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

Cosmetic filters and scriptlets don't get injected for an iframed website #963

Closed
uBlock-user opened this issue Mar 27, 2020 · 3 comments
Closed
Labels
external issue involving an external factor Firefox specific to Firefox invalid not a uBlock issue

Comments

@uBlock-user
Copy link
Contributor

uBlock-user commented Mar 27, 2020

Description

As above and discussed internally at https://github.com/orgs/uBlockOrigin/teams/ublock-issues-volunteers/discussions/177

A specific URL where the issue occurs

https://www.underhentai.net/shujii-no-inbou/

Steps to Reproduce

  • Open the logger, browse to https://www.underhentai.net/shujii-no-inbou/ (NSFW) in a new tab

  • Scroll down abit untill the episode listing appears.

  • Click the watch button for the first episode under Online category and be led to https://www.underhentai.net/watch/?id=1790&ep=0

  • Switch to the logger page, put streamz. as the filter, observe that scriptlets are not listed by the logger even though uBO is injecting 3 scriptlets as per uBlock Filters list --

streamz.cc##+js(acis, Math, zfgloaded)
streamz.cc##+js(window.open-defuser)
streamz.cc##+js(set, jQuery.adblock, false)

Cosmetic filters are not injected themselves, to reproduce, add streamz.cc###video_1 and refresh the page, player will still appear working even though it's supposed to be hidden with the above filter.

Expected behavior:

Scriptlets applied to an iframed domain appear as expected.

Actual behavior:

Scriptlets applied to an iframed domain do not appear.

Your environment

  • uBlock Origin version: 1.25.3rc0
  • Browser Name and version: Firefox 76
  • Operating System and version: Win 10
@uBlock-user uBlock-user added bug Something isn't working Firefox specific to Firefox labels Mar 27, 2020
@uBlock-user uBlock-user changed the title Scriptlets injected for an iframed website don't appear in the logger Cosmetic filters and scriptlets injected for an iframed website don't appear in the logger Mar 27, 2020
@uBlock-user uBlock-user changed the title Cosmetic filters and scriptlets injected for an iframed website don't appear in the logger Cosmetic filters don'tget injected and scriptlets injected for an iframed website don't appear in the logger Mar 27, 2020
@uBlock-user uBlock-user changed the title Cosmetic filters don'tget injected and scriptlets injected for an iframed website don't appear in the logger Cosmetic filters don't get injected and scriptlets injected for an iframed website don't appear in the logger Mar 27, 2020
@uBlock-user uBlock-user changed the title Cosmetic filters don't get injected and scriptlets injected for an iframed website don't appear in the logger Cosmetic filters and scriptlets don't get injected for an iframed website Mar 27, 2020
@gorhill
Copy link
Member

gorhill commented Mar 27, 2020

So far from what I can tell is that uBO's content scripts are not injected by Firefox, this would explain why either cosmetic filtering or scriptlets are not injected, so the logger is reflecting this correctly.

I don't know why Firefox is not injecting uBO's content scripts -- I wonder if this has to do with the streamz.cc iframe having a sandbox attribute set, this needs further investigation.

@gorhill
Copy link
Member

gorhill commented Mar 27, 2020

There is https://bugzilla.mozilla.org/show_bug.cgi?id=1610394, which has been marked as a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1411641.

@uBlock-user uBlock-user added external issue involving an external factor and removed bug Something isn't working labels Mar 27, 2020
@uBlock-user uBlock-user added the invalid not a uBlock issue label May 26, 2020
@MasterKia
Copy link
Member

uBlockOrigin/uAssets#16138

Cosmetic filters don't work on the iframe (with sandbox attribute) inside this page:
https://inyheter.no/2022/12/27/disse-lovene-trer-i-kraft-ved-nyttar/

inyheter.no##.wp-embed-comments
inyheter.no##.wp-embed-share

I've found two workarounds:

  1. Use HTML filters:
inyheter.no##^.wp-embed-comments
inyheter.no##^.wp-embed-share
  1. Remove the sandbox attribute:
    Add inyheter.no##iframe:remove-attr(sandbox), go to the page and right-click on the frame and choose This frame => Reload frame, now all cosmetic filters will work on the iframe; bad for security.

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 invalid not a uBlock issue
Projects
None yet
Development

No branches or pull requests

3 participants