diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index f5a608331..9eecf6706 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -657,6 +657,10 @@ class App { throw new Error('No encryption key got found to encrypt the credentials!'); } + if (incomingData.name === '') { + throw new Error('Credentials have to have a name set!'); + } + // Check if credentials with the same name and type exist already const findQuery = { where: { @@ -696,6 +700,10 @@ class App { const id = req.params.id; + if (incomingData.name === '') { + throw new Error('Credentials have to have a name set!'); + } + // Add the date for newly added node access permissions for (const nodeAccess of incomingData.nodesAccess) { if (!nodeAccess.date) {