From a0c2b652def473e2e1f6f87ae08d5142742884db Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 17 Jun 2022 19:27:47 +0800 Subject: [PATCH] fix: handle project name length in backend --- packages/nocodb/src/lib/meta/api/projectApis.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nocodb/src/lib/meta/api/projectApis.ts b/packages/nocodb/src/lib/meta/api/projectApis.ts index dda91b43a4..5ff0a2436c 100644 --- a/packages/nocodb/src/lib/meta/api/projectApis.ts +++ b/packages/nocodb/src/lib/meta/api/projectApis.ts @@ -95,6 +95,10 @@ async function projectCreate(req: Request, res) { projectBody.is_meta = false; } + if (projectBody?.title.length > 50) { + NcError.badRequest('Project title exceeds 50 characters'); + } + if (await Project.getByTitle(projectBody?.title)) { NcError.badRequest('Project title already in use'); }