Skip to content
This repository has been archived by the owner on Jun 8, 2018. It is now read-only.

Breaks report-uri analyse tools #17

Closed
rugk opened this issue Dec 19, 2015 · 4 comments
Closed

Breaks report-uri analyse tools #17

rugk opened this issue Dec 19, 2015 · 4 comments

Comments

@rugk
Copy link

rugk commented Dec 19, 2015

With this addon these tools are broken as they will always redirect to the home page:

More information: https://twitter.com/rugkme/status/675972938110210048

CC: @ScottHelme

@Synzvato
Copy link
Owner

Thanks for reporting the issue! There are a few things here that keep Decentraleyes from injecting local resources. Namely the, relatively new, crossorigin and integrity script attributes:

<script src="/jquery.min.js" integrity="sha256-ivk7..." crossorigin="anonymous"></script>

Technically it's a duplicate of #16 and thus a known bug. It affects a relatively small amount of websites that enforce an additional set of rules for loading content. This is being looked into and chances are a permanent solution to this problem will be found within the very near future.

Decentraleyes v1.2.0 has experimental support for whitelisting specific domains (that works as long as a request has referrer information). So, installing that new version and adding "report-uri.io" to the whitelist (inside Add-on Manager preferences) should prevent the website from breaking.

@rugk
Copy link
Author

rugk commented Dec 19, 2015

Well... yeah. Prevent injections is the purpose of Subresource Integrity. 😃

But should not the hashes be equal if the file is exactly the same (as it is supposed to be with this addon)?

@Synzvato
Copy link
Owner

But should not the hashes be equal if the file is exactly the same [...].

That's a very good observation! The injected code is, of course, fully identical. Bundled files have been stripped of things like source mapping comments, because the actual mapping files are not bundled to save space. Also, by default, Decentraleyes adds comments to injected files to signal local delivery.

A tool to ensure resource integrity is included in the add-on, and is also used by reviewers at Mozilla to make sure the actual code is unaltered. So that's why regular file fingerprints often don't match.

The reason the other attribute crossorigin causes issues, is because it demands that the responses contain headers that state cross-origin requests are allowed. Decentraleyes currently redirects requests to data URIs. That particular protocol has nothing to do with HTTP, so chaos ensues.

That's the problem in a nutshell. Any ideas or suggestions are highly welcome!

@Synzvato
Copy link
Owner

Synzvato commented Dec 3, 2017

@rugk I have since decided to create a bug (1419459) on Mozilla's bugtracker. Upvotes are welcome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants