Repository navigation
In HTTP Nowhere mode, attempt HTTPS before block. - #7435
Conversation
This applies to both main frame resources and subresource loads, though in practice only image subresources get a chance to be rewritten, due to mixed content blocking. Loop detection still works, so pages that redirect back to HTTP will get caught by that and eventually get the "cancelled by extension" message.
|
Reviewed WebExtensions code, lgtm. Added XPCOM code, @jsha can you review? |
|
@cooperq do you have time to review this with me on Monday? |
| return {redirectUrl: newuristr.replace(/^http:/, "https:")}; | ||
| } | ||
| } | ||
| if (newuristr && newuristr.substring(0, 5) === "http:") { |
There was a problem hiding this comment.
This if clause is redundant and should probably be removed.
There was a problem hiding this comment.
It's actually not: the previous clause (if (shouldCancel)) covers the case where the request started with an HTTP request. This clause (if (newuristr && newuristr.substring(0, 5) === "http:")) covers the case where we started on an HTTPS page and got redirected to HTTP (by 301 or by a downgrade rule).
There was a problem hiding this comment.
Makes sense. I rescind my comments then.
|
Hey guys, @ivysrono just talked to me about UpgradeMixedContent. It's an extension that inserts The flaw is inserting such a header let browsers also rewrite display content while it's not blocked by default. If the display content isn't available for HTTPS, it fails. It's quite aggressive to do so for normal users who think http images don't really hurt, but it might be a good way for http-nowhere mode. Any thoughts? |
|
Could you open a fresh issue for this? |
|
@gloomy-ghost tag me when you open the issue please |
This applies to both main frame resources and subresource loads, though in
practice only image subresources get a chance to be rewritten, due to mixed
content blocking.
Loop detection still works, so pages that redirect back to HTTP will get caught
by that and eventually get the "cancelled by extension" message.
Fixes #2115