Skip to content

Handle WSL filesystem path when analyze security zone of a file - #13120

Merged
Aditya Patwardhan (adityapatwardhan) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:wsluri
Jul 13, 2020
Merged

Aditya Patwardhan (adityapatwardhan) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:wsluri

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Jul 6, 2020 •

Copy link
Copy Markdown
Member

PR Summary

Fix #13106

WSL2 introduces a new filesystem path to access the Linux filesystem from Windows. Depending on the distro name, it would look like \wsl$\ubuntu. The problem is that this is not a valid UNC path, so it raises a UriFormatException when analyzing the security zone of the file as part of the work done by AuthorizationManager.

Fix is to check this type of path and consider it the MyComputer zone.

PR Checklist

@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Jul 7, 2020
@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pwsh.exe -C ./myscript.ps1 fails from WSL

3 participants