mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
More linter
This commit is contained in:
@@ -86,7 +86,7 @@ export const pkiAcmeChallengeServiceFactory = ({
|
||||
const { cause } = exp;
|
||||
let errors: Error[] = [];
|
||||
if (cause instanceof AggregateError) {
|
||||
errors = cause.errors;
|
||||
errors = cause.errors as Error[];
|
||||
} else if (cause instanceof Error) {
|
||||
errors = [cause];
|
||||
}
|
||||
@@ -97,6 +97,8 @@ export const pkiAcmeChallengeServiceFactory = ({
|
||||
return new AcmeConnectionError({ message: "Connection refused" });
|
||||
} else if (fetchError.code === "ENOTFOUND" || fetchError.message.includes("ENOTFOUND")) {
|
||||
return new AcmeDnsFailureError({ message: "Hostname could not be resolved (DNS failure)" });
|
||||
} else {
|
||||
return new AcmeServerInternalError({ message: "Unknown error validating ACME challenge response" });
|
||||
}
|
||||
}
|
||||
} else if (exp instanceof Error) {
|
||||
|
||||
@@ -222,6 +222,7 @@ export const pkiAcmeServiceFactory = ({
|
||||
};
|
||||
|
||||
const validateExistingAccountJwsPayload = async <
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
TSchema extends z.ZodSchema<any> | undefined = undefined,
|
||||
T = TSchema extends z.ZodSchema<infer R> ? R : string
|
||||
>({
|
||||
@@ -385,7 +386,7 @@ export const pkiAcmeServiceFactory = ({
|
||||
// Make sure the JWK in the EAB payload matches the one provided in the outer JWS payload
|
||||
const decoder = new TextDecoder();
|
||||
const decodedEabPayload = decoder.decode(eabPayload);
|
||||
const eabJWK = JSON.parse(decodedEabPayload);
|
||||
const eabJWK = JSON.parse(decodedEabPayload) as JsonWebKey;
|
||||
const eabPayloadJwkThumbprint = await calculateJwkThumbprint(eabJWK, "sha256");
|
||||
if (eabPayloadJwkThumbprint !== publicKeyThumbprint) {
|
||||
throw new AcmeBadPublicKeyError({
|
||||
|
||||
Reference in New Issue
Block a user