Skip to content

Commit

Permalink
update some spacing, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd committed Apr 23, 2024
1 parent ce71c08 commit 098b92b
Showing 1 changed file with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ public class RegisteredSanitizer
public string Id { get; set; }
public RecordedTestSanitizer Sanitizer { get; set; }

public RegisteredSanitizer(RecordedTestSanitizer sanitizer, string id)
public string Description { get; set; }

public RegisteredSanitizer(RecordedTestSanitizer sanitizer, string id, string description = null)
{
Id = id;
Sanitizer = sanitizer;
Description = description;
}
}

Expand Down Expand Up @@ -47,16 +50,16 @@ 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, any other type = 4XXX
* General sanitizers = 1XXX
* Header sanitizers = 2XXX
* Body sanitizers = 3XXX
* URI, special, other = 4XXX
*
* */

public List<RegisteredSanitizer> DefaultSanitizerList = new List<RegisteredSanitizer>
{
#region general
#region GeneralRegex
// basic RecordedTestSanitizer handles Authorization header
new RegisteredSanitizer(
new RecordedTestSanitizer(),
Expand Down Expand Up @@ -84,14 +87,16 @@ public SanitizerDictionary() {
),
new RegisteredSanitizer(
new GeneralRegexSanitizer(regex: "common/userrealm/(?<realm>[^/\\.]+)", groupForReplace: "realm"),
"AZSDK1005"
"AZSDK1005",
"ACS Identity leverages these strings to store identity information."
),
new RegisteredSanitizer(
new GeneralRegexSanitizer(regex: "/identities/(?<realm>[^/?]+)", groupForReplace: "realm"),
"AZSDK1006"
"AZSDK1006",
"ACS Identity leverages these strings to store identity information."
),
#endregion
#region header
#region HeaderRegex
new RegisteredSanitizer(
new HeaderRegexSanitizer("api-key"),
"AZSDK2001"
Expand Down Expand Up @@ -275,9 +280,8 @@ public SanitizerDictionary() {
"AZSDK3013"
),
#endregion

#region BodyKey
new RegisteredSanitizer(
#region BodyKey
new RegisteredSanitizer(
new BodyKeySanitizer("$..access_token"),
"AZSDK3400"
),
Expand Down Expand Up @@ -666,7 +670,6 @@ public SanitizerDictionary() {
"AZSDK3496"
),
#endregion

#region UriRegex
new RegisteredSanitizer(
new UriRegexSanitizer(regex: "sig=(?<sig>[^&]+)", groupForReplace: "sig"),
Expand All @@ -680,10 +683,9 @@ public SanitizerDictionary() {
new UriRegexSanitizer(regex: "(?:(sv|sig|se|srt|ss|sp)=)(?<secret>[^&\\\"\\s]*)", groupForReplace: "secret"),
"AZSDK4002"
),
#endregion

#region RemoveHeader
new RegisteredSanitizer(
#endregion
#region RemoveHeader
new RegisteredSanitizer(
new RemoveHeaderSanitizer("Telemetry-Source-Time"),
"AZSDK4003"
),
Expand All @@ -692,7 +694,6 @@ public SanitizerDictionary() {
"AZSDK4004"
),
#endregion

};

/// <summary>
Expand Down

0 comments on commit 098b92b

Please sign in to comment.