Skip to content

Commit

Permalink
Fix code scanning alert no. 39: Log entries created from user input
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
JoeShook and github-advanced-security[bot] authored Oct 7, 2024
1 parent 2583a6d commit 9e212fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Udap.Common/Metadata/UdapMetaDataBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public string GetCommunitiesAsHtml(string path)

if (udapMetadataConfig == null)
{
_logger.LogWarning("Missing metadata for community: {Community}", System.Net.WebUtility.UrlEncode(community));
var sanitizedCommunity = community?.Replace("\r", "").Replace("\n", "");
_logger.LogWarning("Missing metadata for community: {Community}", System.Net.WebUtility.UrlEncode(sanitizedCommunity));
return null;
}

Expand Down

0 comments on commit 9e212fa

Please sign in to comment.