Skip to content

Commit 371887a

Browse files
authored
Yabo/acr endpoints bugfix: matchers could be null (#224)
* add ACR domain suffix * fix * provide parameter to accepet list of regex filter * remove redundant constructor * correct variable name * move debugging filter to AzurePSCmdlet * Update AzurePSCmdlet.cs remove redundant line * Update AzurePSCmdlet.cs remove unnecessary decorator * Update AzurePSCmdlet.cs add comments * mark default matcher as static readonly * fix * bug fix
1 parent a02bcdb commit 371887a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Common/Utilities/GeneralUtilities.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,12 @@ public static string GetHttpResponseLog(string statusCode, HttpHeaders headers,
269269

270270
public static string TransformBody(string inBody, IList<Regex> matchers = null)
271271
{
272-
foreach (Regex match in matchers)
272+
if (matchers != null)
273273
{
274-
inBody = match.Replace(inBody, "$1\"<redacted>\"");
274+
foreach (Regex match in matchers)
275+
{
276+
inBody = match.Replace(inBody, "$1\"<redacted>\"");
277+
}
275278
}
276279
return inBody;
277280
}

0 commit comments

Comments
 (0)