Strengthen the client_secret sanitizer regex (#5474)

* Strengthen the client_secret sanitizer regex

* clang-format update
This commit is contained in:
Ahson Khan 2024-04-04 15:04:15 -07:00 committed by GitHub
parent 408bd2bead
commit ce6b3bd124
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -241,10 +241,7 @@ void TestProxyManager::SetProxySanitizer()
};
addSanitizer(SanitizerType::General, g_accountRegex, "account");
addSanitizer(
SanitizerType::Body,
"client_secret=(?<clientsecret>[a-zA-Z0-9\\%_~\\-\\.]+)",
"clientsecret");
addSanitizer(SanitizerType::Body, "client_secret=(?<clientsecret>[^&]+)", "clientsecret");
const std::string storageSasSignatureRegex = "\\?.*sig=(?<sassig>[a-zA-Z0-9\\%\\/+=]+)";
addSanitizer(SanitizerType::Uri, storageSasSignatureRegex, "sassig");
addSanitizer(SanitizerType::Header, storageSasSignatureRegex, "sassig", "x-ms-copy-source");