fix(core): Prevent issues with missing or mismatching encryption key (#8332)

This commit is contained in:
Iván Ovejero
2024-01-16 18:25:53 +01:00
committed by GitHub
parent 7bb2d1799e
commit d4c93b1607
7 changed files with 62 additions and 45 deletions

View File

@@ -1259,38 +1259,22 @@ export class HttpRequestV3 implements INodeType {
genericCredentialType = this.getNodeParameter('genericAuthType', 0) as string;
if (genericCredentialType === 'httpBasicAuth') {
try {
httpBasicAuth = await this.getCredentials('httpBasicAuth', itemIndex);
} catch {}
httpBasicAuth = await this.getCredentials('httpBasicAuth', itemIndex);
} else if (genericCredentialType === 'httpDigestAuth') {
try {
httpDigestAuth = await this.getCredentials('httpDigestAuth', itemIndex);
} catch {}
httpDigestAuth = await this.getCredentials('httpDigestAuth', itemIndex);
} else if (genericCredentialType === 'httpHeaderAuth') {
try {
httpHeaderAuth = await this.getCredentials('httpHeaderAuth', itemIndex);
} catch {}
httpHeaderAuth = await this.getCredentials('httpHeaderAuth', itemIndex);
} else if (genericCredentialType === 'httpQueryAuth') {
try {
httpQueryAuth = await this.getCredentials('httpQueryAuth', itemIndex);
} catch {}
httpQueryAuth = await this.getCredentials('httpQueryAuth', itemIndex);
} else if (genericCredentialType === 'httpCustomAuth') {
try {
httpCustomAuth = await this.getCredentials('httpCustomAuth', itemIndex);
} catch {}
httpCustomAuth = await this.getCredentials('httpCustomAuth', itemIndex);
} else if (genericCredentialType === 'oAuth1Api') {
try {
oAuth1Api = await this.getCredentials('oAuth1Api', itemIndex);
} catch {}
oAuth1Api = await this.getCredentials('oAuth1Api', itemIndex);
} else if (genericCredentialType === 'oAuth2Api') {
try {
oAuth2Api = await this.getCredentials('oAuth2Api', itemIndex);
} catch {}
oAuth2Api = await this.getCredentials('oAuth2Api', itemIndex);
}
} else if (authentication === 'predefinedCredentialType') {
try {
nodeCredentialType = this.getNodeParameter('nodeCredentialType', 0) as string;
} catch {}
nodeCredentialType = this.getNodeParameter('nodeCredentialType', 0) as string;
}
const requestMethod = this.getNodeParameter('method', itemIndex) as string;