Fix the regex to match client secret in OAuth requests, ignore `Cookie` when matching requests (#5070)
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Co-authored-by: microzchang <zchang@microsoft.com>
This commit is contained in:
Родитель
50c18516df
Коммит
2c8143a702
|
@ -242,7 +242,9 @@ void TestProxyManager::SetProxySanitizer()
|
|||
|
||||
addSanitizer(SanitizerType::General, g_accountRegex, "account");
|
||||
addSanitizer(
|
||||
SanitizerType::Body, "client_secret=(?<clientsecret>[a-zA-Z0-9\\%]+)", "clientsecret");
|
||||
SanitizerType::Body,
|
||||
"client_secret=(?<clientsecret>[a-zA-Z0-9\\%_~\\-\\.]+)",
|
||||
"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");
|
||||
|
@ -266,6 +268,7 @@ void TestProxyManager::SetProxySanitizer()
|
|||
const std::vector<std::string> excludedHeaders = {
|
||||
"Expect",
|
||||
"Connection",
|
||||
"Cookie",
|
||||
};
|
||||
jsonRoot["excludedHeaders"] = std::accumulate(
|
||||
excludedHeaders.begin(),
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "cpp",
|
||||
"TagPrefix": "cpp/storage",
|
||||
"Tag": "cpp/storage_5ae381f797"
|
||||
"Tag": "cpp/storage_f8b8f80b3c"
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче