-
Notifications
You must be signed in to change notification settings - Fork 473
Referer leak #320
Comments
Is this network request made from within the behind-the-scene scope? |
uBlock says behind-the-scene, uMatrix says tab scope, and Firefox logged it in the page's network inspector.
The URL on this page does not work? I managed to reproduce the issue on a clean profile using this issue page. |
Ok, there is nothing leaked in there: it's Twitter sending a payload to itself when a CSP directive is violated, which occurs when uBlock/uMatrix block scripts in the current case. Twitter merely sends to itself the current CSP header which caused the violation. Regarding the |
But won't this information |
Mine was empty. Let me look more into this. |
Ok, I now I see it, don't know why it was not reported previously -- probably hit enter in the address bar instead of refreshing the page. Reading more into this, it does appear that there is a standard syntax for
So I fixed the This occurs only when:
For now the proper solution I can think of is to remove the I could take the opportunity to modernize the CSP injection code to avoid injecting if inline scripts are already forbidden by the site, it's probably going to become a more common occurrence as CSP is becoming more used by web sites. |
Related: #129. |
I need to import the CSP-related changes to uBlock. |
Ugh, the fix works well for Chromium, but not for Firefox: Looks like Firefox's CSP-report-uri feature relies on the original CSP header, never on the modified one. I will need something more to address Firefox's specific behavior. |
Side note for Firefox: with NoScript, the spurious CSP report-related network request also occurs, but as opposed to uMatrix, it occurs if allowing 1st-party scripts on Twitter, whereas with uMatrix it occurs if blocking 1st-party scripts on Twitter. |
Can't you just block all |
Feedback with the latest changes here. It appears neutralizing the For the other issue with CSP report, I have to figure a solution for Firefox, which may be none than to let the user block these Outight blocking the URL in Anyways, turns out everything is more complicated than expected. |
Actually, without any extension installed, Firefox fires report-uri network requests for Twitter -- so this has nothing to do with NoScript. |
After giving much thought about the With Firefox, sites could currently workaround referrer spoofing extensions by purposefully designing themselves to systematically cause CSP violations to be fired every time -- fooling those using a referrer spoofer. |
Ok, bug opened at https://bugzilla.mozilla.org/show_bug.cgi?id=1194970. I hope I got all the details right.
Did you mean the report-uri relies on the original referrer header instead of the original CSP header? Because when I removed the report-uri from the CSP header using |
I mean that |
Closing this issue as fixed, as the issue is now in Firefox's camp: https://bugzilla.mozilla.org/show_bug.cgi?id=1194970. |
Firefox 41.0a2
uMatrix 0.9.2.1
Not a clean profile but since I already typed it out I will post this first then confirm it with a clean profile.
Edit:
Confirmed on a clean profile with only
xpinstall.signatures.required = false
and spoof referer in uMatrix set.CSP report-uri
google-analytics.com
blacklisted through one of the host files.Clicking a link to https://twitter.com/ will result in a request to
https://twitter.com/i/csp_report
containing the true referer in the JSON payload.Setting
network.http.referer.XOriginPolicy = 1
blanks the referer as expected, so I expect that it should be doable in uMatrix too.Origin Header
Go to https://www.youtube.com/ check the request header of the woff2 requests to
fonts.gstatic.com
. It includesOrigin: https://www.youtube.com
. No leak in privacy since both domains are owned by Google but I was sure that I saw this somewhere else before.The text was updated successfully, but these errors were encountered: