mirror of
https://github.com/actions/upload-artifact.git
synced 2025-04-01 17:26:34 +00:00
latest changes
This commit is contained in:
parent
e9322adf31
commit
9f58c48839
2 changed files with 14 additions and 12 deletions
13
dist/merge/index.js
vendored
13
dist/merge/index.js
vendored
|
@ -5617,25 +5617,26 @@ class ArtifactHttpClient {
|
|||
/**
|
||||
* Masks the `sig` parameter in a URL and sets it as a secret.
|
||||
* @param url The URL containing the `sig` parameter.
|
||||
* @param urlType The type of the URL (e.g., 'signed_upload_url', 'signed_download_url').
|
||||
* @returns A masked URL where the sig parameter value is replaced with '***' if found,
|
||||
* or the original URL if no sig parameter is present.
|
||||
*/
|
||||
maskSigUrl(url, urlType) {
|
||||
maskSigUrl(url) {
|
||||
const sigIndex = url.indexOf('sig=');
|
||||
if (sigIndex !== -1) {
|
||||
const sigValue = url.substring(sigIndex + 4);
|
||||
(0, core_1.setSecret)(sigValue);
|
||||
const maskedUrl = `${url.substring(0, sigIndex + 4)}***`;
|
||||
(0, core_1.debug)(`Masked ${urlType}: ${maskedUrl}`);
|
||||
return `${url.substring(0, sigIndex + 4)}***`;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
maskSecretUrls(body) {
|
||||
if (typeof body === 'object' && body !== null) {
|
||||
if ('signed_upload_url' in body &&
|
||||
typeof body.signed_upload_url === 'string') {
|
||||
this.maskSigUrl(body.signed_upload_url, 'signed_upload_url');
|
||||
this.maskSigUrl(body.signed_upload_url);
|
||||
}
|
||||
if ('signed_url' in body && typeof body.signed_url === 'string') {
|
||||
this.maskSigUrl(body.signed_url, 'signed_url');
|
||||
this.maskSigUrl(body.signed_url);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
13
dist/upload/index.js
vendored
13
dist/upload/index.js
vendored
|
@ -5617,25 +5617,26 @@ class ArtifactHttpClient {
|
|||
/**
|
||||
* Masks the `sig` parameter in a URL and sets it as a secret.
|
||||
* @param url The URL containing the `sig` parameter.
|
||||
* @param urlType The type of the URL (e.g., 'signed_upload_url', 'signed_download_url').
|
||||
* @returns A masked URL where the sig parameter value is replaced with '***' if found,
|
||||
* or the original URL if no sig parameter is present.
|
||||
*/
|
||||
maskSigUrl(url, urlType) {
|
||||
maskSigUrl(url) {
|
||||
const sigIndex = url.indexOf('sig=');
|
||||
if (sigIndex !== -1) {
|
||||
const sigValue = url.substring(sigIndex + 4);
|
||||
(0, core_1.setSecret)(sigValue);
|
||||
const maskedUrl = `${url.substring(0, sigIndex + 4)}***`;
|
||||
(0, core_1.debug)(`Masked ${urlType}: ${maskedUrl}`);
|
||||
return `${url.substring(0, sigIndex + 4)}***`;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
maskSecretUrls(body) {
|
||||
if (typeof body === 'object' && body !== null) {
|
||||
if ('signed_upload_url' in body &&
|
||||
typeof body.signed_upload_url === 'string') {
|
||||
this.maskSigUrl(body.signed_upload_url, 'signed_upload_url');
|
||||
this.maskSigUrl(body.signed_upload_url);
|
||||
}
|
||||
if ('signed_url' in body && typeof body.signed_url === 'string') {
|
||||
this.maskSigUrl(body.signed_url, 'signed_url');
|
||||
this.maskSigUrl(body.signed_url);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue