diff --git a/Source/Csla.Shared/Reflection/MethodCaller.cs b/Source/Csla.Shared/Reflection/MethodCaller.cs index 3c7b81c0c6..46d8f112c6 100644 --- a/Source/Csla.Shared/Reflection/MethodCaller.cs +++ b/Source/Csla.Shared/Reflection/MethodCaller.cs @@ -234,7 +234,11 @@ public static Type GetType(string typeName, bool throwOnError, bool ignoreCase) string[] splitName = typeName.Split(','); if (splitName.Length > 2) { - var asm = AssemblyLoadContext.Default.LoadFromAssemblyPath(AppContext.BaseDirectory + splitName[1].Trim() + ".dll"); + var path = AppContext.BaseDirectory + splitName[1].Trim() + ".dll"; + if (path.Contains("..") || path.Contains(':')) + throw new TypeLoadException(path); + + var asm = AssemblyLoadContext.Default.LoadFromAssemblyPath(path); return asm.GetType(splitName[0].Trim()); } else