Skip to content

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

fix(api): enforce maximum length for search query in organization listing

Victor Hugo dos Santos411fc0915117
diff --git a/backend/src/ee/routes/v1/license-v2-router.ts b/backend/src/ee/routes/v1/license-v2-router.ts
index b76da713e8..59b1a42d68 100644
--- a/backend/src/ee/routes/v1/license-v2-router.ts
+++ b/backend/src/ee/routes/v1/license-v2-router.ts
@@ -273,7 +273,7 @@ export const registerLicenseV2Router = async (server: FastifyZodProvider) => {
"List the root organizations whose billing the caller may read. A self-hosted instance admin gets every organization on the instance, because one licence covers them all; everyone else gets only their own.",
params: z.object({ organizationId: z.string().trim().uuid() }),
querystring: z.object({
- search: z.string().trim().optional().describe("Match root organizations whose name contains this."),
+ search: z.string().trim().max(255).optional().describe("Match root organizations whose name contains this."),
limit: z.coerce.number().min(1).max(1000).default(100).describe("Maximum organizations to return."),
offset: z.coerce.number().min(0).default(0).describe("Number of organizations to skip.")
}),