fix: Upgrade axios to address CVE-2023-45857 (#7713)
[GH Advisory](https://github.com/advisories/GHSA-wf5p-g6vw-rhxx)
This commit is contained in:
committed by
GitHub
parent
8e6b951a76
commit
64eb9bbc36
@@ -251,19 +251,15 @@ export class VaultProvider extends SecretsProvider {
|
||||
this.#http = axios.create({ baseURL: baseURL.toString() });
|
||||
if (this.settings.namespace) {
|
||||
this.#http.interceptors.request.use((config) => {
|
||||
return {
|
||||
...config,
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unsafe-assignment
|
||||
headers: { ...config.headers, 'X-Vault-Namespace': this.settings.namespace },
|
||||
};
|
||||
config.headers['X-Vault-Namespace'] = this.settings.namespace;
|
||||
return config;
|
||||
});
|
||||
}
|
||||
this.#http.interceptors.request.use((config) => {
|
||||
if (!this.#currentToken) {
|
||||
return config;
|
||||
if (this.#currentToken) {
|
||||
config.headers['X-Vault-Token'] = this.#currentToken;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unsafe-assignment
|
||||
return { ...config, headers: { ...config.headers, 'X-Vault-Token': this.#currentToken } };
|
||||
return config;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -324,9 +324,15 @@ export class MessageEventBusDestinationWebhook
|
||||
password: httpBasicAuth.password as string,
|
||||
};
|
||||
} else if (httpHeaderAuth) {
|
||||
this.axiosRequestOptions.headers[httpHeaderAuth.name as string] = httpHeaderAuth.value;
|
||||
this.axiosRequestOptions.headers = {
|
||||
...this.axiosRequestOptions.headers,
|
||||
[httpHeaderAuth.name as string]: httpHeaderAuth.value as string,
|
||||
};
|
||||
} else if (httpQueryAuth) {
|
||||
this.axiosRequestOptions.params[httpQueryAuth.name as string] = httpQueryAuth.value;
|
||||
this.axiosRequestOptions.params = {
|
||||
...this.axiosRequestOptions.params,
|
||||
[httpQueryAuth.name as string]: httpQueryAuth.value as string,
|
||||
};
|
||||
} else if (httpDigestAuth) {
|
||||
this.axiosRequestOptions.auth = {
|
||||
username: httpDigestAuth.user as string,
|
||||
|
||||
Reference in New Issue
Block a user