debugging

This commit is contained in:
Salman Chishti 2025-03-07 08:06:30 -08:00
parent 5b6ae99d8b
commit c30eb5542e
4 changed files with 20 additions and 4 deletions

View File

@ -5739,17 +5739,21 @@ class CacheServiceClient {
*/
maskSigUrl(url, urlType) {
const sigMatch = url.match(/[?&]sig=([^&]+)/);
(0, core_1.debug)(`Sigmatch is ${sigMatch}`);
if (sigMatch) {
(0, core_1.setSecret)(sigMatch[1]);
(0, core_1.setSecret)(url);
(0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`);
}
}
maskSecretUrls(body) {
(0, core_1.debug)('body is passed to masksecreturls');
(0, core_1.debug)(`Body in mask urls: ${JSON.stringify(body, null, 2)}`);
if ('signedUploadUrl' in body && body.signedUploadUrl) {
(0, core_1.debug)('entered that there is signedupload url');
this.maskSigUrl(body.signedUploadUrl, 'signed_upload_url');
}
if ('signedDownloadUrl' in body && body.signedDownloadUrl) {
(0, core_1.debug)('entered that there is signed download url');
this.maskSigUrl(body.signedDownloadUrl, 'signed_download_url');
}
}

View File

@ -5739,17 +5739,21 @@ class CacheServiceClient {
*/
maskSigUrl(url, urlType) {
const sigMatch = url.match(/[?&]sig=([^&]+)/);
(0, core_1.debug)(`Sigmatch is ${sigMatch}`);
if (sigMatch) {
(0, core_1.setSecret)(sigMatch[1]);
(0, core_1.setSecret)(url);
(0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`);
}
}
maskSecretUrls(body) {
(0, core_1.debug)('body is passed to masksecreturls');
(0, core_1.debug)(`Body in mask urls: ${JSON.stringify(body, null, 2)}`);
if ('signedUploadUrl' in body && body.signedUploadUrl) {
(0, core_1.debug)('entered that there is signedupload url');
this.maskSigUrl(body.signedUploadUrl, 'signed_upload_url');
}
if ('signedDownloadUrl' in body && body.signedDownloadUrl) {
(0, core_1.debug)('entered that there is signed download url');
this.maskSigUrl(body.signedDownloadUrl, 'signed_download_url');
}
}

View File

@ -5739,17 +5739,21 @@ class CacheServiceClient {
*/
maskSigUrl(url, urlType) {
const sigMatch = url.match(/[?&]sig=([^&]+)/);
(0, core_1.debug)(`Sigmatch is ${sigMatch}`);
if (sigMatch) {
(0, core_1.setSecret)(sigMatch[1]);
(0, core_1.setSecret)(url);
(0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`);
}
}
maskSecretUrls(body) {
(0, core_1.debug)('body is passed to masksecreturls');
(0, core_1.debug)(`Body in mask urls: ${JSON.stringify(body, null, 2)}`);
if ('signedUploadUrl' in body && body.signedUploadUrl) {
(0, core_1.debug)('entered that there is signedupload url');
this.maskSigUrl(body.signedUploadUrl, 'signed_upload_url');
}
if ('signedDownloadUrl' in body && body.signedDownloadUrl) {
(0, core_1.debug)('entered that there is signed download url');
this.maskSigUrl(body.signedDownloadUrl, 'signed_download_url');
}
}

6
dist/save/index.js vendored
View File

@ -5739,17 +5739,21 @@ class CacheServiceClient {
*/
maskSigUrl(url, urlType) {
const sigMatch = url.match(/[?&]sig=([^&]+)/);
(0, core_1.debug)(`Sigmatch is ${sigMatch}`);
if (sigMatch) {
(0, core_1.setSecret)(sigMatch[1]);
(0, core_1.setSecret)(url);
(0, core_1.debug)(`Masked ${urlType}: ${url.replace(sigMatch[1], '***')}`);
}
}
maskSecretUrls(body) {
(0, core_1.debug)('body is passed to masksecreturls');
(0, core_1.debug)(`Body in mask urls: ${JSON.stringify(body, null, 2)}`);
if ('signedUploadUrl' in body && body.signedUploadUrl) {
(0, core_1.debug)('entered that there is signedupload url');
this.maskSigUrl(body.signedUploadUrl, 'signed_upload_url');
}
if ('signedDownloadUrl' in body && body.signedDownloadUrl) {
(0, core_1.debug)('entered that there is signed download url');
this.maskSigUrl(body.signedDownloadUrl, 'signed_download_url');
}
}