mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#17869: Fix medium trust issue
"Assembly.Location" propery is not allowed in medium trust. Use the virtual path of the assembly file instead. Work Item: 17869 --HG-- branch : 1.x
This commit is contained in:
@@ -53,11 +53,13 @@ namespace Orchard.Environment.Extensions.Loaders {
|
|||||||
if (assembly == null)
|
if (assembly == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
var assemblyPath = _virtualPathProvider.Combine("~/bin", descriptor.Id + ".dll");
|
||||||
|
|
||||||
return new ExtensionProbeEntry {
|
return new ExtensionProbeEntry {
|
||||||
Descriptor = descriptor,
|
Descriptor = descriptor,
|
||||||
LastWriteTimeUtc = File.GetLastWriteTimeUtc(assembly.Location),
|
LastWriteTimeUtc = _virtualPathProvider.GetFileLastWriteTimeUtc(assemblyPath),
|
||||||
Loader = this,
|
Loader = this,
|
||||||
VirtualPath = _virtualPathProvider.Combine("~/bin", descriptor.Id + ".dll")
|
VirtualPath = assemblyPath
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user