gorhill / uMatrix

uMatrix: Point and click matrix to filter net requests according to source, destination and type
GNU General Public License v3.0
4.55k stars 470 forks source link

Chrome shows raw gzip instead of actual page when uMatrix is enabled #948

Closed Tomalak closed 6 years ago

Tomalak commented 6 years ago

Setup:

This happens on one of my company's Intranet webservers (IIS, gzip compression is enabled) and appears directly tied to the enabled/disabled state of the uMatrix extension. When uMatrix is enabled, the pages look like this:

image

That appears to be textual representation of the raw, gzipped bytes of the server response body.

When uMatrix is disabled, the pages look perfectly fine. The issue does not seem occur with other servers that have compressed responses, but can be reproduced reliably on this one.

Here is what I did:

Other observations:

When uMatrix is enabled, there is only a single request in the "Network" tab of Chromes dev tools - the one for the page itself, which comes back with 200 OK, but garbled body text. When uMatrix is disabled, the body text looks fine and the other resources (scripts, CSS, etc) are requested subsequently as the page renders.

There is nothing of note in the uMatrix logger window. The request shows up there as well and appears with a gray background, i.e. untouched by uMatrix.

For the sake of completeness, these are the server response headers:

Content-Encoding: gzip
Content-Language: de-DE
Content-Type: text/html; charset=UTF-8
Date: Thu, 08 Feb 2018 12:51:55 GMT
Server: Microsoft-IIS/6.0
Transfer-Encoding: chunked
Vary: Accept-Encoding
WWW-Authenticate: Negotiate xxxxxxxxxxx
X-UA-Compatible: ie=edge

I realize that this potentially falls into the "if I disable uMatrix it works" category that you don't want to hear about, but I've done my best to make a case that it isn't merely misconfiguration or lack of understanding of how uMatrix works, but more likely something in the internals of uMatrix itself.

Happy to give anything you would need, but frankly I am at a loss what else to provide. (I could provide Wireshark dumps if need be, but I am reluctant to do so just yet.)

uBlock-user commented 6 years ago

Sounds like https://github.com/gorhill/uMatrix/issues/912

Tomalak commented 6 years ago

@uBlock-user Possibly. What has me stumped here is that (contrary to the similar issues) only atually disabling the extension makes a difference. Reloading the page with F5 does nothing at all.

Chrome is perfectly happy with the server response as long as uBlock is not enabled.

uBlock-user commented 6 years ago

@Tomalak Try settingdisableCSPReportInjection to true. If it works, that confirms that it is indeed #912.

Tomalak commented 6 years ago

@uBlock-user All-right, that's it. Thank you.

uBlock-user commented 6 years ago

@gorhill Seems the bug got fixed today in Chromium 66.