Skip to content

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

fix(project): allow up to 64 char slug on create to match update route

Devin AI5ae6f94a75dd
diff --git a/backend/src/server/routes/v1/project-router.ts b/backend/src/server/routes/v1/project-router.ts
index 1ab3d6433b..8b5e56097a 100644
--- a/backend/src/server/routes/v1/project-router.ts
+++ b/backend/src/server/routes/v1/project-router.ts
@@ -218,7 +218,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
.max(1024, { message: "Description must be 1024 or fewer characters" })
.optional()
.describe(PROJECTS.CREATE.projectDescription),
- slug: slugSchema({ min: 5, max: 36 }).optional().describe(PROJECTS.CREATE.slug),
+ slug: slugSchema({ min: 5, max: 64 }).optional().describe(PROJECTS.CREATE.slug),
kmsKeyId: z.string().optional(),
template: slugSchema({ field: "Template Name", max: 64 })
.optional()
diff --git a/backend/src/server/routes/v2/deprecated-project-router.ts b/backend/src/server/routes/v2/deprecated-project-router.ts
index 7aefc9e75f..e2fe563240 100644
--- a/backend/src/server/routes/v2/deprecated-project-router.ts
+++ b/backend/src/server/routes/v2/deprecated-project-router.ts
@@ -112,7 +112,7 @@ export const registerDeprecatedProjectRouter = async (server: FastifyZodProvider
.max(1024, { message: "Description must be 1024 or fewer characters" })
.optional()
.describe(PROJECTS.CREATE.projectDescription),
- slug: slugSchema({ min: 5, max: 36 }).optional().describe(PROJECTS.CREATE.slug),
+ slug: slugSchema({ min: 5, max: 64 }).optional().describe(PROJECTS.CREATE.slug),
kmsKeyId: z.string().optional(),
template: slugSchema({ field: "Template Name", max: 64 })
.optional()