From 43e8bcbe4a6ad157316d533fc37f2b32188b1c88 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 18 Nov 2020 21:11:39 -0800 Subject: [PATCH] Added option to turn off email verification. --- meshcentral-config-schema.json | 3 ++- meshmail.js | 1 + public/scripts/agent-desktop-0.0.2.js | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/meshcentral-config-schema.json b/meshcentral-config-schema.json index 2f742130..53272afd 100644 --- a/meshcentral-config-schema.json +++ b/meshcentral-config-schema.json @@ -538,7 +538,8 @@ "from": { "type": "string", "format": "email" }, "tls": { "type": "boolean" }, "tlscertcheck": { "type": "boolean" }, - "tlsstrict": { "type": "boolean" } + "tlsstrict": { "type": "boolean" }, + "verifyemail": { "type": "boolean", "default": true, "description": "When set to false, the email format and DNS MX record are not checked." } }, "required": [ "host", "port", "from", "tls" ] }, diff --git a/meshmail.js b/meshmail.js index 73c9a2b0..1c21568d 100644 --- a/meshmail.js +++ b/meshmail.js @@ -363,6 +363,7 @@ module.exports.CreateMeshMail = function (parent) { // Check the email domain DNS MX record. obj.approvedEmailDomains = {}; obj.checkEmail = function (email, func) { + if (parent.config.smtp.verifyemail === false) { func(true); return; } var emailSplit = email.split('@'); if (emailSplit.length != 2) { func(false); return; } if (obj.approvedEmailDomains[emailSplit[1]] === true) { func(true); return; } diff --git a/public/scripts/agent-desktop-0.0.2.js b/public/scripts/agent-desktop-0.0.2.js index 29fc97fa..047b684b 100644 --- a/public/scripts/agent-desktop-0.0.2.js +++ b/public/scripts/agent-desktop-0.0.2.js @@ -534,13 +534,13 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { obj.xxMouseWheel = function (e) { if (obj.State == 3) { obj.SendMouseMsg(obj.KeyAction.SCROLL, e); return false; } return true; } obj.xxKeyUp = function (e) { if ((e.key != 'Dead') && (obj.State == 3)) { - if ((e.key.length == 1) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) { obj.SendKeyUnicode(obj.KeyAction.UP, e.key.charCodeAt(0)); } else { obj.SendKeyMsg(obj.KeyAction.UP, e); } + if ((e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) { obj.SendKeyUnicode(obj.KeyAction.UP, e.key.charCodeAt(0)); } else { obj.SendKeyMsg(obj.KeyAction.UP, e); } } if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; } obj.xxKeyDown = function (e) { if ((e.key != 'Dead') && (obj.State == 3)) { - if ((e.key.length == 1) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) { obj.SendKeyUnicode(obj.KeyAction.DOWN, e.key.charCodeAt(0)); } else { obj.SendKeyMsg(obj.KeyAction.DOWN, e); } + if ((e.key.length == 1) && (e.ctrlKey != true) && (e.altKey != true) && ((obj.remoteKeyMap == false) || (obj.debugmode > 0))) { obj.SendKeyUnicode(obj.KeyAction.DOWN, e.key.charCodeAt(0)); } else { obj.SendKeyMsg(obj.KeyAction.DOWN, e); } } if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }