mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 14:27:30 +00:00
Fix challenge match
This commit is contained in:
@@ -66,7 +66,7 @@ export const pkiAcmeChallengeServiceFactory = ({
|
|||||||
throw new BadRequestError({ message: "ACME challenge response is not 200" });
|
throw new BadRequestError({ message: "ACME challenge response is not 200" });
|
||||||
}
|
}
|
||||||
const challengeResponseBody = await challengeResponse.text();
|
const challengeResponseBody = await challengeResponse.text();
|
||||||
const thumbprint = Buffer.from(challenge.auth.account.publicKeyThumbprint, "utf-8").toString("base64url");
|
const thumbprint = challenge.auth.account.publicKeyThumbprint;
|
||||||
const expectedChallengeResponseBody = `${challenge.auth.token}.${thumbprint}`;
|
const expectedChallengeResponseBody = `${challenge.auth.token}.${thumbprint}`;
|
||||||
if (challengeResponseBody.trimEnd() !== expectedChallengeResponseBody) {
|
if (challengeResponseBody.trimEnd() !== expectedChallengeResponseBody) {
|
||||||
throw new AcmeIncorrectResponseError({ message: "ACME challenge response is not correct" });
|
throw new AcmeIncorrectResponseError({ message: "ACME challenge response is not correct" });
|
||||||
|
|||||||
Reference in New Issue
Block a user