8000 fix #732 - add NoZone to allowed zones by himbeles · Pull Request #841 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

fix #732 - add NoZone to allowed zones #841

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix #732 - add NoZone to allowed zones
Add System.Security.SecurityZone.NoZone to the allowed zones in order to prevent "File is blocked (NTFS Security)" error on certain Windows and mac installations. Fixes issue #732.
  • Loading branch information
himbeles authored Apr 5, 2019
commit 94aa58a12aaf2c9187b50041ce0ee8cfd924ba6d
2 changes: 1 addition & 1 deletion src/runtime/moduleobject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public static Assembly AddReference(string name)
if (System.IO.File.Exists(name))
{
var zone = System.Security.Policy.Zone.CreateFromUrl(name);
if (zone.SecurityZone != System.Security.SecurityZone.MyComputer)
if ((zone.SecurityZone != System.Security.SecurityZone.MyComputer) && (zone.SecurityZone != System.Security.SecurityZone.NoZone))
{
throw new Exception($"File is blocked (NTFS Security)");
}
Expand Down
0