mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-12-26 23:16:47 +01:00
Bump email packages, rename users internal variable.
This commit is contained in:
@@ -629,7 +629,7 @@ module.exports = function(RED) {
|
||||
this.starttls = n.starttls;
|
||||
this.certFile = n.certFile;
|
||||
this.keyFile = n.keyFile;
|
||||
this.users = n.users;
|
||||
this.mtausers = n.users;
|
||||
this.auth = n.auth;
|
||||
try {
|
||||
this.options = JSON.parse(n.expert);
|
||||
@@ -687,10 +687,10 @@ module.exports = function(RED) {
|
||||
}
|
||||
|
||||
node.options.onAuth = function (auth, session, callback) {
|
||||
let id = node.users.findIndex(function (item) {
|
||||
let id = node.mtausers.findIndex(function (item) {
|
||||
return item.name === auth.username;
|
||||
});
|
||||
if (id >= 0 && node.users[id].password === auth.password) {
|
||||
if (id >= 0 && node.mtausers[id].password === auth.password) {
|
||||
callback(null, { user: id + 1 });
|
||||
} else {
|
||||
callback(new Error("Invalid username or password"));
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "node-red-node-email",
|
||||
"version": "3.0.4",
|
||||
"version": "3.1.0",
|
||||
"description": "Node-RED nodes to send and receive simple emails.",
|
||||
"dependencies": {
|
||||
"imap": "^0.8.19",
|
||||
"node-pop3": "^0.9.1",
|
||||
"mailparser": "^3.7.2",
|
||||
"nodemailer": "^6.10.1",
|
||||
"smtp-server": "^3.13.6"
|
||||
"mailparser": "^3.7.4",
|
||||
"nodemailer": "^7.0.5",
|
||||
"smtp-server": "^3.14.0"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
"imap",
|
||||
|
||||
Reference in New Issue
Block a user