Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix: coerce boolean on endpoint
adilsonb5c7155ddbe8
diff --git a/backend/src/server/routes/v1/project-env-router.ts b/backend/src/server/routes/v1/project-env-router.tsindex 2b4412d000..4bcdd63828 100644--- a/backend/src/server/routes/v1/project-env-router.ts+++ b/backend/src/server/routes/v1/project-env-router.ts@@ -10,6 +10,8 @@ import { verifyAuth } from "@app/server/plugins/auth/verify-auth";import { AuthMode } from "@app/services/auth/auth-type";import { PostHogEventTypes } from "@app/services/telemetry/telemetry-types";+const booleanParam = () => z.enum(["true", "false"]).transform((value) => value === "true");+export const registerProjectEnvRouter = async (server: FastifyZodProvider) => {server.route({method: "GET",@@ -226,7 +228,7 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => {id: z.string().trim().describe(ENVIRONMENTS.DELETE.id)}),querystring: z.object({- hardDelete: z.coerce.boolean().optional().default(false).describe(ENVIRONMENTS.DELETE.hardDelete)+ hardDelete: booleanParam().optional().describe(ENVIRONMENTS.DELETE.hardDelete)}),response: {200: z.object({@@ -256,7 +258,7 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => {metadata: {slug: environment.slug,name: environment.name,- hardDelete: req.query.hardDelete+ hardDelete: req.query.hardDelete ?? false}}});