Skip to content

Commit

Permalink
chore: Potential fix for code scanning alert no. 37: Log entries crea…
Browse files Browse the repository at this point in the history
…ted from user input

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
tnotheis and github-advanced-security[bot] authored Feb 27, 2025
1 parent f8dd7e9 commit 3168823
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public void Deregister(string address)

public async Task EnqueueFor(string address, string eventName, CancellationToken cancellationToken)
{
_logger.LogDebug("Enqueueing event '{EventName}'", eventName);
var sanitizedEventName = eventName.Replace(Environment.NewLine, "").Replace("\n", "").Replace("\r", "");
_logger.LogDebug("Enqueueing event '{EventName}'", sanitizedEventName);

if (!_channels.TryGetValue(address, out var channel))
throw new ClientNotFoundException();
Expand Down

0 comments on commit 3168823

Please sign in to comment.