Skip to content

webframe: api to register scheme as privileged - #2852

Merged
zcbenz merged 1 commit into
electron:masterfrom
deepak1556:web_frame_scheme_api_patch
Sep 22, 2015
Merged

zcbenz merged 1 commit into
electron:masterfrom
deepak1556:web_frame_scheme_api_patch

Conversation

@deepak1556

Copy link
Copy Markdown
Member

Fixes #2831

@deepak1556

Copy link
Copy Markdown
Member Author

Although this fixes the security error for registering service workers, with current version chromium there are hard coded checks for scheme is http/https to handle service worker requests, hence they wont work. But this has been fixed in this CL which gives embedders's a chance to register schemes that can handle service workers, we need to wait for that.

Comment thread atom/renderer/api/atom_api_web_frame.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to keep it for backward compatibility.

@deepak1556
deepak1556 force-pushed the web_frame_scheme_api_patch branch from 9843dec to 325feca Compare September 21, 2015 17:30
@zcbenz

zcbenz commented Sep 22, 2015

Copy link
Copy Markdown
Contributor

Thanks!

zcbenz added a commit that referenced this pull request Sep 22, 2015
webframe: api to register scheme as privileged
@zcbenz
zcbenz merged commit 008af00 into electron:master Sep 22, 2015
@rogeru

rogeru commented Oct 11, 2015

Copy link
Copy Markdown

Thank you. Do we know when the missing Chrome issue will be available to be included in Electron?

@deepak1556
deepak1556 deleted the web_frame_scheme_api_patch branch October 12, 2015 19:48
@deepak1556

Copy link
Copy Markdown
Member Author

@rogeru that particular CLs' parent issue is set for M46 release, not sure when. You could open an issue for tracking, will be implemented once the api becomes available.

@rogeru

rogeru commented Oct 13, 2015

Copy link
Copy Markdown

Thanks @deepak1556.

I am using registerUrlSchemeAsPrivileged which gets me passed the previous error about file:// not being allowed. The next error is "SecurityError: Failed to register a ServiceWorker: No URL is associated with the caller's document."
It seems we also need to wait for https://code.google.com/p/chromium/issues/detail?id=522900.

@deepak1556

Copy link
Copy Markdown
Member Author

Yes thats because of the checks i was talking about which only does SchemeIsHTTPorHTTPS everywhere now. Once the upgrade its replaced by generic OriginCanAccessServiceWorkers check everywhere. This maintains a map of schemes allowed which is obtained from ContentClient::AddServiceWorkerSchemes

@havenchyk

Copy link
Copy Markdown

@deepak1556 is this fix already in the release? Can I already use it?

@deepak1556

Copy link
Copy Markdown
Member Author

@havenchyk nope need to wait for chromium upgrade, can be tracked here #3312 (comment)

@havenchyk

Copy link
Copy Markdown

@deepak1556 how about now? I guess there was an upgrade to Chrome 47? Should we wait for #3733 ?

@deepak1556

Copy link
Copy Markdown
Member Author

@havenchyk yup need to wait on the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants