Skip to content

Commit

Permalink
#4133 Backfit of : Prevent use of .. or : in file path #3552 (#4144)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaceySoftware authored Aug 6, 2024
1 parent 6973dbb commit f3a5c34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Csla/Reflection/MethodCaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,11 @@ public static Type GetType(string typeName, bool throwOnError, bool ignoreCase)

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
Expand Down

0 comments on commit f3a5c34

Please sign in to comment.