mirror of
https://github.com/n8n-io/n8n.git
synced 2024-09-20 17:37:25 +03:00
:zip: Do not allow credentials without name
This commit is contained in:
parent
c174f6cc70
commit
9a2188f22f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user