uBlockOrigin / uMatrix-issues

This is the community-maintained issue tracker for uMatrix
https://github.com/gorhill/uMatrix
123 stars 17 forks source link

'no-workers: 1st-party false' is not effective #253

Closed theltalpha closed 4 years ago

theltalpha commented 4 years ago

Prerequisites

Description

The setting 'no-workers: 1st-party false' in "My rules" does not show the expected behaviour.

A specific URL where the issue occurs

https://vorarlberg.orf.at/stories/3046065/

Steps to Reproduce

  1. In "My rules" implement the rules 'no-workers: * true' to block workers globally and 'no-workers: 1st-party false' to relax the global rule and allow workers for first party domains.
  2. Open the above mentioned webpage. At the end of the article there is a video.
  3. In the switchboard in the 'orf.at' scope allow everything first party and additionally XHR for apasfiis.sf.apa.at in order to load the website correctly. Reload the page.
  4. Open uMatrix logger and click on the play button of the video. In the logger you will notice one red entry. The invoking website's domain is vorarlberg.orf.at, its a worker and the blocked element is https://vorarlberg.orf.at/stories/3046065/.

Now, this is strange. The blocked element is first party in regard to the invoking website, but according to the rules this should be allowed. Even if I click on -- the rules are represented correctly in the switchboard:

screenshot

But the video won't play. Only if I specifically add 'no-workers: orf.at false' as a rule it would play the video.

Ruleset

As described above.

Your environment

gorhill commented 4 years ago

The blocked element is first party in regard to the invoking website, but according to the rules this should be allowed.

The per-scope switches are independent from matrix filtering, they do not inherit their state from matrix filtering rules.

See https://github.com/gorhill/uMatrix/wiki/Per-scope-switches.

uBlock-user commented 4 years ago

That's not a valid rule either, you put * or domain there.

gorhill commented 4 years ago

I don't think it's invalid, the screenshot shows an issue: it shows an allow rule for worker type. The issue is that the logger is wrong, uMatrix does not support such rule for worker. This has been fixed in dev build of uMatrix, this is what one get now when clicking on a row with worker resource:

a

uBlock-user commented 4 years ago

I don't think it's invalid,

So we can use 1st-party instead of * or the domain itself ?

gorhill commented 4 years ago

No, not for per-scope switches. I didn't even realize the whole issue was about this.