From afd8602c69954b89404cd5fab289aac2cd474de6 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Mon, 6 May 2024 10:27:16 -0700 Subject: [PATCH] update the string to properly escape newline --- .../Common/SanitizerDictionary.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs index d858472e72e..503fa332a8d 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Common/SanitizerDictionary.cs @@ -39,7 +39,7 @@ public class SanitizerDictionary public ConcurrentDictionary Sanitizers = new ConcurrentDictionary(); // we have to know which sanitizers are session only - // so that when we start a new recording we can properly + // so that when we start a new recording we can properly // apply only the sanitizers that have been registered at the global level public List SessionSanitizers = new List(); @@ -51,12 +51,12 @@ public SanitizerDictionary() { /* * The below list has been grouped and labelled with some room for expansion. As such: - * + * * General sanitizers = 1XXX * Header sanitizers = 2XXX * Body sanitizers = 3XXX * URI, special, other = 4XXX - * + * * */ private const string EMPTYGUID = "00000000-0000-0000-0000-000000000000"; @@ -101,7 +101,7 @@ public SanitizerDictionary() { "ACS Identity leverages these strings to store identity information." ), new RegisteredSanitizer( - new GeneralRegexSanitizer(regex: "(?:[?&](sig)=)(?[^&\\\"\\s\n,\\\\]*)", groupForReplace: "secret"), + new GeneralRegexSanitizer(regex: "(?:[?&](sig)=)(?[^&\\\"\\s\\n,\\\\]*)", groupForReplace: "secret"), "AZSDK1007", "Common SAS URL Sanitizer. Applies to all headers, URIs, and text bodies." ), @@ -226,19 +226,19 @@ public SanitizerDictionary() { #endregion #region BodyRegex new RegisteredSanitizer( - new BodyRegexSanitizer(regex: "(client_id=)(?[^&\\\"\\s\n,\\\\]+)", groupForReplace: "cid"), + new BodyRegexSanitizer(regex: "(client_id=)(?[^&\\\"\\s\\n,\\\\]+)", groupForReplace: "cid"), "AZSDK3000" ), new RegisteredSanitizer( - new BodyRegexSanitizer(regex: "client_secret=(?[^&\\\"\\s\n,\\\\]+)", groupForReplace: "secret"), + new BodyRegexSanitizer(regex: "client_secret=(?[^&\\\"\\s\\n,\\\\]+)", groupForReplace: "secret"), "AZSDK3001" ), new RegisteredSanitizer( - new BodyRegexSanitizer(regex: "client_assertion=(?[^&\\\"\\s\n,\\\\]+)", groupForReplace: "secret"), + new BodyRegexSanitizer(regex: "client_assertion=(?[^&\\\"\\s\\n,\\\\]+)", groupForReplace: "secret"), "AZSDK3002" ), new RegisteredSanitizer( - new BodyRegexSanitizer(regex: "token=(?[^&\\\"\\s\n,\\\\)", groupForReplace: "token"), + new BodyRegexSanitizer(regex: "token=(?[^&\\\"\\s\\n,\\\\)", groupForReplace: "token"), "AZSDK3003" ), new RegisteredSanitizer(