We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f0f6b6b + f0c5f62 commit d27ab61Copy full SHA for d27ab61
src/runtime/moduleobject.cs
@@ -395,6 +395,14 @@ public static Assembly AddReference(string name)
395
{
396
assembly = AssemblyManager.LoadAssemblyFullPath(name);
397
}
398
+ if (System.IO.File.Exists(name))
399
+ {
400
+ var zone = System.Security.Policy.Zone.CreateFromUrl(name);
401
+ if (zone.SecurityZone != System.Security.SecurityZone.MyComputer)
402
403
+ throw new Exception($"File is blocked (NTFS Security)");
404
+ }
405
406
if (assembly == null)
407
408
throw new FileNotFoundException($"Unable to find assembly '{name}'.");
0 commit comments