-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add a scriptlet to set any of data attribute src of img #2347
Comments
Meaning that if I would add such scriptlets (which is frowned upon here security-wise because it's about creating information which didn't exist), those sites would move to doing something else which would render those worrying scriptlets pointless? How is it worth it after all? |
As I wrote, the technique was also used in uBlockOrigin/uAssets#13982 in past. This is a kind of something those who implment anti-adb can generally think of. As to security concern, it does not actually add non-existent: it sets data attribute set by the site as src. Probably it can be restricted to work only for img tag and only if the data attribute is valid image URL. |
Ok, so it's about moving a value from one to-be-specified attribute to the |
For rocketnews, |
More specifically |
Looks like same situation happens for |
Another case this is/was useful: AdguardTeam/Scriptlets#106 (comment) |
Thanks to @MasterKia for pointing to this feauture request. |
I added However I extended the possible |
Still many new is undocumented also we shouldn't created pointed list with only 1 position. |
Also this is danger:
Maybe better avoid inject attribute |
Confirmed
solve the problem in Private window still not fixed despite reported. |
Prerequisites
I tried to reproduce the issue when...
Description
Related issues:
AdguardTeam/AdguardFilters#132525 (uBlockOrigin/uAssets#15341)
AdguardTeam/AdguardFilters#132814
AdguardTeam/AdguardFilters#132922
(past)
uBlockOrigin/uAssets#13982 (AdguardTeam/AdguardFilters#119946)
These sites set
data-sco-src
attribute as real image path and lazyload images only if ads are unblocked. Currently there's no way for uBO to fix this other than whitelisting, but on AG this rule works:youpouch.com,rocketnews24.com#%#AG_onLoad(function(){const a=document.querySelectorAll("img[data-sco-src]");a.forEach(a=>{const b=a.getAttribute("data-sco-src");a.setAttribute("src",b),a.style.opacity="1"})});
. This is not the first time I see the technique: although no more reproducible,syosetu.top
in uBlockOrigin/uAssets#13982 did the same and as you see in mapx-'s commit there was no way other than whitelistingsyosetu.top/cdn-cgi/zaraz/s.js
which is a real ad script. Given this is used at least twice by differnt groups, I guess we should have a generic way to counter. Pls note,rocketnews24.com
and its sister sites are now in ongoing cat-and-mouse game and I guess they started kinda A/B test. You may not be able to reproduce due to this and I myself took some time to take the screenshot.A specific URL where the issue occurs.
https://rocketnews24.com/2017/01/20/852372/
Steps to Reproduce
data-sco-src
attribute and are lazyloaded only if bunch of whitelists (in Japanese filters) are added.data-sco-src
is not set and currentlyrocketnews24.com##+js(set, navigator.webdriver, true)
is working fine. IDK what can be done.Expected behavior
We should have a scriptlet like
##+js(set-src, data-sco-src, .lazy)
Actual behavior
Not available
uBO version
1.44.4
Browser name and version
Chrome 107.0.5304.88
Operating System and version
Windows 10
The text was updated successfully, but these errors were encountered: