Skip to content
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

#83646 Webview: Cannot load resource outside of protocol root", if .md source is an network share #84702

Merged
merged 3 commits into from Nov 16, 2019

Conversation

@hadzhiyski
Copy link
Contributor

hadzhiyski commented Nov 13, 2019

ElectronWebviewBasedWebview local resource roots are with uppercase authority (host name)

This PR fixes #83646

ElectronWebviewBasedWebview local resource roots are with uppercase authority (host name)
@hadzhiyski hadzhiyski changed the title #83646 Check resource lower case URIs strings when running on Windows #83646 Webview: Cannot load resource outside of protocol root", if .md source is an network share Nov 13, 2019
@mjbvz mjbvz self-assigned this Nov 13, 2019
@hadzhiyski

This comment has been minimized.

Copy link
Contributor Author

hadzhiyski commented Nov 14, 2019

Hello, @mjbvz ,

I am quite new to the vscode repository. Could you give me any guidelines if I am missing something? In my opinion the issue is fixed with latest changes.


// windows paths are case insensitive
// when checking remote host, the host name is uppercase
if (extensionLocation && (

This comment has been minimized.

Copy link
@mjbvz

mjbvz Nov 14, 2019

Contributor

Are you sure this is the correct fix? This code only applies if the extension is running remotely (which seems unrelated to #83646)

This comment has been minimized.

Copy link
@hadzhiyski

hadzhiyski Nov 15, 2019

Author Contributor

Yeah... I was mistaken. I think I fixed it with the latest changes. The issue comes from the following - Electron is providing the UNC root authority in uppercase and the resource is requested with lowercase authority.
image

This comment has been minimized.

Copy link
@hadzhiyski

hadzhiyski Nov 15, 2019

Author Contributor

isUNC(root.fsPath) && isUNC(resource.fsPath) this should do. It's tested on a Windows 10 desktop.

@hadzhiyski hadzhiyski requested a review from mjbvz Nov 15, 2019
@mjbvz mjbvz merged commit 154f2dd into microsoft:master Nov 16, 2019
5 checks passed
5 checks passed
linux
Details
windows
Details
darwin
Details
VS Code #20191115.17 succeeded
Details
license/cla All CLA requirements met.
@mjbvz

This comment has been minimized.

Copy link
Contributor

mjbvz commented Nov 16, 2019

Thanks! This fix will be in the next insiders build and is scheduled to ship with VS Code 1.41 early next month

@mjbvz mjbvz added this to the November 2019 milestone Nov 16, 2019
@hadzhiyski

This comment has been minimized.

Copy link
Contributor Author

hadzhiyski commented Nov 16, 2019

Thank you for the support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.