8000 Remove asar: protocol, use file: protocol instead by zcbenz · Pull Request #1077 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove asar: protocol, use file: protocol instead #1077

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

Merged
merged 5 commits into from
Feb 1, 2015
Merged

Conversation

zcbenz
Copy link
Contributor
@zcbenz zcbenz commented Feb 1, 2015

This PR removes the asar: protocol, and make file: protocol compatible with asar archives instead.

For custom protocols there are some limitations in Chrome. One limitation is the custom protocol has to be a standard protocol to be able to make HTML document fully featured(#1071), but for standard protocol URLs like asar://C:/file are invalid. For Chrome the file: is hard-coded on may places to make it a standard protocol while keeping the ability to represent Windows file paths.

Another limitation is there are some security restrictions for custom protocol (#1069), which are unnecessary if the custom protocol already accesses the file system. The file: bypasses those security restrictions also by hard-coding the conditions in code.

So it is nearly impossible to make asar: protocol work exactly like file: protocol, in order to fix this, we have to avoid using a new protocol and make file: protocol support asar archives.

Fixes #1071.
Fixes #1069.

@bwin
Copy link
Contributor
bwin commented Feb 1, 2015

IMO it's actually a lot nicer to not have a separate protocol for it.

zcbenz added a commit that referenced this pull request Feb 1, 2015
Remove asar: protocol, use file: protocol instead
@zcbenz zcbenz merged commit fd2b200 into master Feb 1, 2015
@zcbenz zcbenz deleted the asar-standard branch February 1, 2015 06:30
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.

Script tag doesn't work correctly in page loaded by asar: protocol Can not load files in asar archives in custom protocols
2 participants
0