From 9a2188f22fdcca8076d893cddc2e95833fef4b4d Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Thu, 9 Jan 2020 21:23:47 -0600 Subject: [PATCH] :zip: Do not allow credentials without name --- packages/cli/src/Server.ts | 8 ++++++++ 1 file changed, 8 insertions(+) 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) {