Skip to content

Commit

Permalink
fix: avoid logging injection
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Dec 24, 2023
1 parent 22233a2 commit 81c1e78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GZCTF/Utils/LogHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static void Log<T>(this ILogger<T> logger, string msg, string uname, stri
{
using (logger.BeginScope("{UserName}{Status}{IP}", uname, status, ip))
{
logger.Log(level ?? LogLevel.Information, msg);
logger.Log(level ?? LogLevel.Information, "{msg}", msg);
}
}

Expand Down

0 comments on commit 81c1e78

Please sign in to comment.