-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UPGRADE: Consider upgrade-insecure-requests
in an insecure response as redirecting.
#212
Comments
One issue that I see here is that you're punishing upgrade-capable UAs the first time they access the site over HTTP, by forcing them to download the full response (or a large chunk of it, assuming they RST it), and then re-download it over HTTPS. At the end of this redirect the server can serve HSTS headers, making this problem go away for this particular user. Alternatively, we can also pin the Upgrade-capable server, and skip the redirect dance in followup sessions. The secondary issue is that legacy UAs over HTTPS cannot be redirected away back to the unsafe, but intact, HTTP version. A JS API that exposes if the UA is Upgrade-capable can resolve that issue using a client-side redirect. So, all in all, both are a very reasonable price to pay for not spamming the Web forever and ever.:+1: |
Copy/pasting from the thread with @igrigorik: If we have that in place, perhaps we could reverse the signaling by adding an
This clearly addresses the "modern client" use case, and could be abused to address the "legacy vs modern" use case for those sites that really care if we're willing to suffer another redirect:
I expect Ilya's head to explode while reading this ("Two redirects?! Are you MAD!?"). It solves the problem, but isn't pretty, and isn't something I'd hope that most sites care about. :) |
Question: would the client remember the "upgraded" state? For how long and for what scope? |
I could imagine clients experimenting with something like that, but I don't think it's behavior we should mandate (as it starts sliding into HSTS, and I think it would be a mistake to tightly couple upgrading and HSTS-like behaviors). |
My expectation is that we will automatically deploy the "legacy vs modern" algorithm as the out-of-the-box default behaviour for the webservers that run the Let's Encrypt agent, since there won't be an easy way for us to tell if those sites suffer from mixed content or not, and we'll want to minimise breakage on old clients. I don't have a completely clear picture yet of what you are proposing for that case. Let's keep things simple and assume it's a site that isn't ready for the strictures of HSTS, yet. Is the following accurate?
Have I understood that correctly? |
Closing. We're not doing this, but sending an |
If a user navigates to
http://example.com/
(insecure), and receivesContent-Security-Policy: upgrade-insecure-requests
as a response header, her client should behave as though it received a redirect response tohttps://example.com/
.This would remove the necessity for sending a positive
Prefer: return=secure-representation
signal on insecure navigations, as the server can simply opt-in on insecure responses.Without thinking about it too hard, this seems clever. :)
The text was updated successfully, but these errors were encountered: