-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Conversation
Actually, there are rewrites grep 'from="^https' *.xml | wc -l
|
@Bisaloo Please send a list of files which have them. I may rewrite these rules as a part of this PR. |
Note that there are sometimes good reasons for these rewrites. Hopefully, it will documented more often than not. As explained in the issue I linked earlier, these rules sometimes prevent breakages (such as use of protocole relative links |
Let's ask @Hainish and others' opinions. |
I don't like rewriting HTTPS domains because that goes beyond HTTPS Everywhere's mission. At the same time there may be some edge cases I'm not thinking of where rewriting HTTPS is a good idea. Probably the first step is to update each of the relevant rulesets, in separate PRs, like in #9842 (comment) for |
Closing until #10843 is done. |
I agree this is a policy decision, noted that we don't have any downgrade rule anymore, see #9621 (comment). IMHO, it is unneccessary to remove the legacy rewrite since the users are not exposed to plain-text connection because of this anyway. Let's see @Hainish opinion on this. Besides, @koops76 why do you need to modify the code base for this? I think that the same goal can be achieved by updating the ruleset in #10843 . P.S. I am rather conservative to changes in the extension code base because this extension is installed on the tor-browser by default. |
@cschanaj manifest.json: var -> const/let replacement probably should have been in its own pull request. |
@koops76 I think it will be much better to have a separate PR for the replacement. |
@cschanaj I cleaned out all these var to const/let changes from this PR. |
Again, closing until #10843 is done. |
@cschanaj If nothing but HTTP is needed then I'm okay with restricting the permissions to just HTTP. This improves security, for example it would make it significantly more difficult for a malicious contributor to sneak an unexpected HTTPS rewrite into a ruleset. If we make this change to the extension permissions, then we should also add a check that the |
@jeremyn A malicious contributor can do anything, this change doesn't prevent malicious code modification. |
A malicious contributor has to get their changes past a reviewer first. A reviewer might overlook something like this <rule from="https://good\.example\.com/" to="https://evil.example.org/" /> buried in a large PR, especially if the PR requires a lot of discussion or is rebased/squashed by the contributor, but the reviewer will almost certainly notice unexpected changes to |
@jeremyn This is also true for HTTP rewrite, for example <rule from="http://good\.example\.com/" to="https://good.example.org.localhost/" /> will block all the connection to IMHO, a probable way to remedy this is to restrict rewrite such that We should allow rewrite like (same domain) <rule from="http://good\.example\.com/" to="https://secure.example.com/" /> but not (cross domain) <rule from="http://good\.example\.com/" to="https://good.example.org/" /> Though I guess a significant number of existing rulesets will fail this requirement. |
@cschanaj That would break lots of rules that redirect from a custom domain to a canonical CDN domain to fix certificate mismatch errors. |
@cschanaj I agree that a reviewer could also miss a malicious HTTP->HTTPS rewrite, however HTTPS->HTTPS rewrites are potentially more dangerous, because even sites with poor HTTPS support will usually make sure critical stuff like logins go through HTTPS. There is almost no chance that a POST request to |
@koops76 Yes, but a CDN can be used to serve malicious content as well. P.S. Personally, I am unwilling to see #10839 (comment) implemented, since it will break too many existing rulesets. @jeremyn I see your point that rewriting HTTPS might have some security impacts to the users. I agree that we should audit/ update existing ruleset with |
@cschanaj I'm talking only about the rulesets that redirect from HTTP-only custom domain to a canonical CDN domain with matching certificate name. |
FYI we have (collectively) discussed cross-domain rewrites, including CDN-related, several times, for example see the links in #7253 (comment). |
@koops76 Never mind. IMHO, #10839 (comment) is not a good idea in the short term because we have limited manpower to review pending PRs. Supposed that we restrict cross domain rewrite, we have to either update/ whitelist existing ruleset. The pending PRs might block new ruleset from getting merged. Also, I am really reluctant to see more whitelist are created. For the moment, it should be much easier to focus on removing |
I don't think we have any HTTPS to HTTPS requests and downgrades are disabled so let's only add a HTTP request handler.