mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +00:00
:zip: Do not allow credentials without name
This commit is contained in:
@@ -657,6 +657,10 @@ class App {
|
|||||||
throw new Error('No encryption key got found to encrypt the credentials!');
|
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
|
// Check if credentials with the same name and type exist already
|
||||||
const findQuery = {
|
const findQuery = {
|
||||||
where: {
|
where: {
|
||||||
@@ -696,6 +700,10 @@ class App {
|
|||||||
|
|
||||||
const id = req.params.id;
|
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
|
// Add the date for newly added node access permissions
|
||||||
for (const nodeAccess of incomingData.nodesAccess) {
|
for (const nodeAccess of incomingData.nodesAccess) {
|
||||||
if (!nodeAccess.date) {
|
if (!nodeAccess.date) {
|
||||||
|
|||||||
Reference in New Issue
Block a user