-
Notifications
You must be signed in to change notification settings - Fork 56
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
Automatically grant https:
host_permissions with http:
#304
Comments
While I mentioned this problem in the context of #303, this issue is not unique to the topic there. The same issue occurs when a website itself redirects (e.g. with HTTP Strict-Transport-Security, or a regular 3xx redirect to a secure scheme). That's why extension developers should use The potential solution was described in the meeting, as:
|
http:
to https:
without permission warningshttps:
host_permissions with http:
@Rob--W Thanks for clarifying. Updated the issue to reflect this. |
Safari does this currently. Granted permissions from the UI are always |
I don't think this is something we'd want to support in Chromium. There's a few concerns I have here:
While I understand that this would potentially reduce the breakage mentioned in issue 303, I don't think it's worth adding another exception and less-predictable behavior. I think we can handle the breakage from issue 303 through appropriate messaging to developers and outreach, and that would be more desirable in the long-term than supporting this going forward. Developers can always opt into this themselves (by just specifying ://example.com/ in their manifests). (I know that the permission warnings a user sees already omit the scheme, but I still think it's valuable for developers / admins / browsers to be able to treat http://example.com and https://example.com as different from an extension permissions perspective.) |
If a manifest only requests https (without http) and the user grants host permissions, would the extension be granted http permissions too? That behavior is what this issue is requesting. If not, and the extension requests http and https permissions in an extension update, would the new http permission automatically be granted too? Note that this issue is not about granting https+http when the manifest has specified both. It is entirely reasonable for an extension to receive permissions for the http(s)+ws(s) schemes when specified in the manifest AND confirmed by the user. I agree with @rdcronin 's concerns above. Extensions with unexpected host access may behave unexpectedly. These concerns have longer-lasting impact than a one-time effort to get everyone to replace "http:" with "https:" in their extension. If Chrome is willing to help their share of the extensions to migrate to the https: permission when needed, then I see no point in automatically treating |
@rdcronin @Rob--W Thanks for your replies! Seems some of the responses are based on misunderstandings. Let me comment and clarify:
This is not what this issue is about. My proposal was to ONLY do upgrades. So:
Yes. It seems to make sense to consider collapsing host permissions here. Not sure this hold true in all browsers, but requesting
See above.
This seems subjective. To me it is more confusing
Why so? granted
Self-restricting is already possible by specifying only
What is this less-predictable behaviour? Not sure what negative side effects you are referring to.
To me it seems very important we make sure not to break extensions when a relatively easy way of preventing this is available. Already many extensions exists on the stores which got broken by changes in the platform. Not every extension is actively maintained and not every author has the resources to constantly keep up with all the changes.
Developers / admins / browsers can already actively restrict http and https based on the CSP they define and the match patterns they use for content scripts. Can you describe what the value would be here? |
Background
Currently when an extension has
host_permissions
specified in thehttp:
protocol, this causes issues when requests happen to be using / being upgraded tohttps:
. This blocks upgrading to a secure environment and is a blocker for #303.Solution
let
http:
permissions be an umbrella host permission which also includeshttps:
permissions. Basically threat it as a synonym for*://example.com/
. This assures no downgrades happen without permission warnings, yet fixes the issue above. For a user, there does not seem to be a clear disadvantage of not being able to notice protocol updates from permission warnings, only confusion.The text was updated successfully, but these errors were encountered: