From 5e7ad5614df5b77f8883cbb0bb0d90ae1daa2716 Mon Sep 17 00:00:00 2001 From: Tuan Dang Date: Tue, 1 Apr 2025 11:08:03 -0700 Subject: [PATCH] Update max ttl param constraint on ssh certificate template creation --- backend/src/ee/routes/v1/ssh-certificate-template-router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/ee/routes/v1/ssh-certificate-template-router.ts b/backend/src/ee/routes/v1/ssh-certificate-template-router.ts index 233ef6d10..a7dc55661 100644 --- a/backend/src/ee/routes/v1/ssh-certificate-template-router.ts +++ b/backend/src/ee/routes/v1/ssh-certificate-template-router.ts @@ -92,7 +92,7 @@ export const registerSshCertificateTemplateRouter = async (server: FastifyZodPro allowHostCertificates: z.boolean().describe(SSH_CERTIFICATE_TEMPLATES.CREATE.allowHostCertificates), allowCustomKeyIds: z.boolean().describe(SSH_CERTIFICATE_TEMPLATES.CREATE.allowCustomKeyIds) }) - .refine((data) => ms(data.maxTTL) > ms(data.ttl), { + .refine((data) => ms(data.maxTTL) >= ms(data.ttl), { message: "Max TLL must be greater than or equal to TTL", path: ["maxTTL"] }),