From 94aa58a12aaf2c9187b50041ce0ee8cfd924ba6d Mon Sep 17 00:00:00 2001
From: Luis R <lri@me.com>
Date: Fri, 5 Apr 2019 09:10:00 +0200
Subject: [PATCH] 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.
---
src/runtime/moduleobject.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/runtime/moduleobject.cs b/src/runtime/moduleobject.cs
index 8af722d29..5d387faef 100644
--- a/src/runtime/moduleobject.cs
+++ b/src/runtime/moduleobject.cs
@@ -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)");
}