Skip to content

Commit

Permalink
Use List<string>
Browse files Browse the repository at this point in the history
  • Loading branch information
timrogers committed Nov 10, 2023
1 parent 3a5d76f commit 1f43610
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Octoshift/Services/OctoLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public class OctoLogger

private const string GENERIC_ERROR_MESSAGE = "An unexpected error happened. Please see the logs for details.";

private readonly HashSet<Regex> _redactionPatterns = new()
private readonly List<string> _redactionPatterns = new()
{
new Regex("\\b(?<=token=)(.+?)\\b")
"\\b(?<=token=)(.+?)\\b"
};

public OctoLogger()
Expand Down Expand Up @@ -96,7 +96,7 @@ private string MaskSecrets(string msg)

foreach (var redactionPattern in _redactionPatterns)
{
result = redactionPattern.Replace(result, "***");
result = Regex.Replace(result, redactionPattern, "***");
}

return result;
Expand Down

0 comments on commit 1f43610

Please sign in to comment.