uMatrix icon indicating copy to clipboard operation
uMatrix copied to clipboard

[0.9.0.2-dev.1] [Firefox] Webm video not blocked?

Open Blutgang opened this issue 11 years ago • 8 comments

Hi, Raymond. Thanks for the great work on porting uMatrix to FF. I came across issue #177 and I clicked on a ~~hotdogman's~~ video ~~(https://a.pomf.se/avonjf.webm)~~ (pomf.se seems to be going under) (http://video.webmfiles.org/big-buck-bunny_trailer.webm). On Firefox 38.0 the webm video loads and the matrix does not show a request for other on ~~pomf.se~~ webmfiles.org. On Chrome 42.0.2311.152 the webm video does not load unless I allow other for ~~pomf.se~~ webmfiles.org.

Rules (github rules basically)

matrix-off: opera-scheme true
* * * block
* * css allow
* * frame block
* * image allow
github.com github.com * allow
github.com raw.githubusercontent.com xhr allow
github.com render.githubusercontent.com frame allow
github.com render.githubusercontent.com script allow
github.com github-cloud.s3.amazonaws.com other allow
github.com github-cloud.s3.amazonaws.com xhr allow

Blutgang avatar May 14 '15 00:05 Blutgang

This is a Firefox quirk: Firefox report the request as being a main document, not a media one. It does not fire a separate request for the video tag, the video is pulled as the top document. If I block the top document, there won't be navigation to the new document, i.e. an unacceptable workaround.

I don't see any sensible solution for this, will have to accept this is a difference in behavior between Chromium/Firefox.

gorhill avatar May 14 '15 14:05 gorhill

How come when you're trying to display a webm "in-line" with the page, such as on https://boards.4chan.org/wsg/catalog the webm gets blocked? You have to allow "Other" for 4cdn.org to make them work.

Opening the video in its own tab makes it work by default however, and no content is seen as either blocked or allowed, like in OP's example.

5t3f4n avatar May 14 '15 15:05 5t3f4n

Look at the what appear in the network tab.

When the video is opened as a doc, no secondary request (just TYPE_DOCUMENT), when embedded, there are secondary requests (TYPE_MEDIA)

no content is seen as either blocked or allowed

The matrix does not have a column for doc, there is only one such request per page. The doc rule is inherited from the hostname rule.

Edit: correction, the doc rule is inherited from an internal * * doc allow rule.

gorhill avatar May 14 '15 16:05 gorhill

Thinking more about this, there might be a solution, but it won't result in FF behaving like Chromium.

Solution: try to detect whether a root document is media, if so, evaluate it as such, and if it is blocked, fallback on the blocked page warning. Caveat: this can happen only after we receive the response from the server, so this won't prevent to connect remotely -- a solution which I do not like, as this makes uMatrix "lie" to the user.

gorhill avatar May 14 '15 16:05 gorhill

This seems to be fixed for me. When loading http://video.webmfiles.org/big-buck-bunny_trailer.webm firefox shows the video ui but when clicking play an other request is block and the video does not play.

Edit: Nevermind I just tried it on a new firefox profile and the problem persists. It seems the use of https://addons.mozilla.org/en-us/firefox/addon/flashstopper/ on my default profile intercepted the autoplay which then gave time for umatrix to block the video?

vzjrz avatar Aug 27 '15 16:08 vzjrz

It looks like I came across the same problem. Nightly 01-04-17, disable 1st party in uMatrix 0.9.9b9. Open these links in a new tab: https://secure.fanboy.co.nz/test.mp4 Result: video is blocked, video is listed in media https://2ch.hk/s/src/2002539/14906383487550.webm Result: video is not blocked, video is not listed anywhere including media

SXZ1 avatar Apr 01 '17 18:04 SXZ1

video is not blocked, video is not listed anywhere including media

Same issue with the webext version, which suggests that the issue is really with Firefox.

gorhill avatar Apr 01 '17 19:04 gorhill

Probably obsolete by now. Couldn't find a working repro cases above. If there is still an issue with this, a new one will have to be opened with all detailed repro steps.

gorhill avatar Apr 15 '18 13:04 gorhill