uBlockOrigin / uAssets

Resources for uBlock Origin, uMatrix: static filter lists, ready-to-use rulesets, etc.
GNU General Public License v3.0
4.13k stars 768 forks source link

jp.motorsport.com: detection #20917

Closed bocchi-rocks closed 10 months ago

bocchi-rocks commented 11 months ago

Prerequisites

URL address of the web page

https://jp.motorsport.com/motogp/news/motogp-rejects-rnfs-entry-for-2024-over-repeated-infractions-and-breaches/10552717/

Category

detection

Description

Enabled The article will be detected. Disabled The article is displayed.

Other extensions used

Adguard 7.15.1 (4386) (build 4386, CL 1.12.87)

Screenshot(s)

Screenshot(s)

Configuration

```yaml uBlock Origin: 1.54.1b0 Firefox: 120 filterset (summary): network: 105796 cosmetic: 55568 scriptlet: 19306 html: 1113 listset (total-discarded, last-updated): default: user-filters: 0-0, never ublock-filters: 36671-109, 1h.1m ublock-badware: 7519-10, 1h.1m ublock-privacy: 860-4, 1h.1m ublock-unbreak: 2200-1, 1h.1m ublock-quick-fixes: 179-2, 1h.1m easylist: 76036-722, 1h.1m easyprivacy: 32970-762, 1h.1m urlhaus-1: 9605-0, now plowe-0: 3720-1, now JPN-1: 13805-23, now filterset (user): [empty] trustedset: added: [array of 8 redacted] userSettings: [none] hiddenSettings: [none] supportStats: allReadyAfter: 638 ms (selfie) maxAssetCacheWait: 432 ms popupPanel: blocked: 1 network: googletagmanager.com: 1 extended: ##.ms-ap ##.ms-apb-dmpu ##.ms-hapb ##+js(addEventListener-defuser, load, length) ##+js(addEventListener-defuser, gtmloaderror) ##+js(noeval-if, interactionCount) ##+js(abort-current-script, vardom) ##+js(remove-cookie, 45grw1567) ##+js(set-cookie, 4d8L2108, 1, , reload, 1) ##+js(abort-current-script, document.querySelector, adblock) ```
mapx- commented 11 months ago

Are you using the 2 adblockers at the same time? (uBo + AG)

bocchi-rocks commented 11 months ago

Are you using the 2 adblockers at the same time? (uBo + AG)

Thank you for your reply. No, I am not. I checked with the function stopped.

mapx- commented 11 months ago
bocchi-rocks commented 11 months ago

Thank you very much. I will test it.

ItsProfessional commented 11 months ago

I am able to reproduce on the latest filters.

Screenshot ![image](https://github.com/uBlockOrigin/uAssets/assets/63961221/0dd9f5cf-850e-4901-9d5f-228c93e1cbb9)

It seems like this filter:

autosport.com,motorsport.com##+js(acs, document.querySelector, adblock)

is not able to defuse this script:

Detection script URL: `https://us-east-1-cdn-ui-k8s.motorsport.com/609/design/dist/js/3619_66ebc1168c61b1904aaf.js` ```js 'use strict'; ( self.webpackChunkmotorsport_design = self.webpackChunkmotorsport_design || [] ).push( [[3619], { 3619: function (e, t, n) { n.r(t); var o = n(3286), c = n(2741); t.default = e => { if ((0, c.RS) ()) return; const t = document.querySelector('#adblock-content-blocked-tpl'), n = document.querySelector(e); if (!t || !n) return; n.innerHTML = '', n.appendChild(t.content.cloneNode(!0)), $.cookie('blockedMSTM', 1, { expires: 3650, path: '/' }); const r = n.querySelector('.adblock-content-blocked__action--signin > a'); r && r.addEventListener('click', (e => { e.preventDefault(), (0, o.t) () })) } } } ] ); ```

The blockedMSTM cookie, set by that script, was in fact set to 1, meaning the script must have executed. And yes, I did check the logger. The filter is active on the web page.

mapx- commented 11 months ago

acs is defusing inline code, if they moved it to external script is not valid anymore, however still no issue on my end

@stephenhawk8054 are you able to reproduce the detection ?

stephenhawk8054 commented 10 months ago

@mapx- Yeah, I cannot reproduce the issue.

As far as I know, they inject the inline script later in the https://mstm.motorsport.com/mstm.js?id=GTM-KFM7PTT&l=gtmDataLayer file. For example this inline script

<script type="text/javascript" id="">(function(){var a=document.createElement("script");a.type="text/javascript";a.charset="utf-8";a.async=!0;a.src=window.location.protocol+"//api.popin.cc/searchbox/motorsport_jp.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)})();</script>

is not in view-source but will appear after you load the page (and that script loaded). So I'm not sure if acs could work in this case? If I remember correctly, some previous solutions of acs also targets this script file.