-
Notifications
You must be signed in to change notification settings - Fork 16.2k
Add protocol.registerSecureSchemes #7671
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
Conversation
There is no need for a separate api, standard schemes can be registered as secure by default (should be done on both browser and renderer). We have already disabled storage for non-standard schemes, so there is no use of making them secure. A bit unrelated to the PR, @zcbenz can we deprecate and remove |
Are you sure? Wouldn't a scheme that proxies to http, but https, be standard but not secure? |
It doesn't matter whether the scheme is authenticated or not. |
If the custom scheme is a proxy for HTTP and not HTTPS then it wouldn't be secure.
|
👍 Calling |
@deepak1556 I'm cool with that. Are other Electron members on board? |
👍
This would break apps that use |
@zcbenz This patch will still crash for non-standard schemes because accessing cache storage apis check for uniqueness of origin and it will fail. The only way I could find to disable cache storage for non-standard schemes is not let them be registered as secure unlike how we disabled other storage apis. If we are disabling cache storage, we should also disable service workers for non-standard schemes. |
How about making |
That should work! Any thoughts on disabling secure option it in |
Sounds good to me. |
Ok, to summarize the changes:
Correct? |
👍 |
I'll get started on this next week. |
Closing this out 👍 |
Solves #7670
Per @deepak1556's advice, I added an interface to the
ContentClient:: AddSecureSchemesAndOrigins
method. Due to the timing in my tests, I found it had to be called before the 'ready' event, as withregisterStandardSchemes
.I'm not sure what the best way is to automatically test this. Suggestions? I was able to confirm it works in my bug demo, https://github.com/pfrazee/electron-bug-securewebviewcrash.