Skip to content

Commit d27ab61

Browse files
authored
Merge pull request #655 from icetiger1974/patch-1
Update moduleobject.cs
2 parents f0f6b6b + f0c5f62 commit d27ab61

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/runtime/moduleobject.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,14 @@ public static Assembly AddReference(string name)
395395
{
396396
assembly = AssemblyManager.LoadAssemblyFullPath(name);
397397
}
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+
}
398406
if (assembly == null)
399407
{
400408
throw new FileNotFoundException($"Unable to find assembly '{name}'.");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy