Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Fix tests

Fang-Pen Lindc00fb366460
diff --git a/backend/bdd/features/steps/pki_acme.py b/backend/bdd/features/steps/pki_acme.py
index e5acae4278..9abe74ab47 100644
--- a/backend/bdd/features/steps/pki_acme.py
+++ b/backend/bdd/features/steps/pki_acme.py
@@ -260,7 +260,7 @@ def send_raw_acme_req(context: Context, url: str):
replace_vars(content["payload"], context.vars) if "payload" in content else None
)
alg = acme_client.net.alg
- encoded_payload = json.dumps(payload).encode() if payload else b""
+ encoded_payload = json.dumps(payload).encode() if payload is not None else b""
protected_headers = json.dumps(protected)
signature = alg.sign(
key=acme_client.net.key.key,
diff --git a/backend/src/ee/services/pki-acme/pki-acme-service.ts b/backend/src/ee/services/pki-acme/pki-acme-service.ts
index 1e7123353b..09faaf8bce 100644
--- a/backend/src/ee/services/pki-acme/pki-acme-service.ts
+++ b/backend/src/ee/services/pki-acme/pki-acme-service.ts
@@ -199,7 +199,7 @@ export const pkiAcmeServiceFactory = ({
throw new AcmeMalformedError({ detail: `Invalid JWS payload: ${error.message}` });
}
logger.error(error, "Unexpected error while parsing JWS payload");
- throw new AcmeServerInternalError({ detail: "Failed to verify JWS payload" });
+ throw new AcmeMalformedError({ detail: "Failed to verify JWS payload" });
}
};