diff --git a/agents/MeshCmd-signed.exe b/agents/MeshCmd-signed.exe index b7c3637e..70f0fd67 100644 Binary files a/agents/MeshCmd-signed.exe and b/agents/MeshCmd-signed.exe differ diff --git a/agents/MeshCmd64-signed.exe b/agents/MeshCmd64-signed.exe index 62eb676d..cd17ecec 100644 Binary files a/agents/MeshCmd64-signed.exe and b/agents/MeshCmd64-signed.exe differ diff --git a/agents/MeshService-signed.exe b/agents/MeshService-signed.exe index 3741de65..a07ea37c 100644 Binary files a/agents/MeshService-signed.exe and b/agents/MeshService-signed.exe differ diff --git a/agents/MeshService.exe b/agents/MeshService.exe index 94fc3711..dde24327 100644 Binary files a/agents/MeshService.exe and b/agents/MeshService.exe differ diff --git a/agents/MeshService64-signed.exe b/agents/MeshService64-signed.exe index 2c0d5783..b9af7473 100644 Binary files a/agents/MeshService64-signed.exe and b/agents/MeshService64-signed.exe differ diff --git a/agents/MeshService64.exe b/agents/MeshService64.exe index fd5a16b3..fee07ecf 100644 Binary files a/agents/MeshService64.exe and b/agents/MeshService64.exe differ diff --git a/agents/agent-translations.json b/agents/agent-translations.json index b02312dc..01cbf423 100644 --- a/agents/agent-translations.json +++ b/agents/agent-translations.json @@ -4,7 +4,7 @@ "agentVersion": "New Version", "group": "Device Group", "url": "Server URL", - "meshName": "Mesh Name", + "meshName": "Group Name", "meshId": "Group Identifier", "serverId": "Server Identifier", "setup": "Setup", @@ -311,7 +311,7 @@ "agent": "Agent", "group": "Apparaat groep", "url": "Server URL", - "meshName": "Mesh naam", + "meshName": "Groepsnaam", "meshId": "Groepsidentificatie", "serverId": "Server identificatie", "setup": "Setup", diff --git a/agents/hashagents.json b/agents/hashagents.json index bfd8d40f..8504a644 100644 --- a/agents/hashagents.json +++ b/agents/hashagents.json @@ -1,15 +1,15 @@ { "3": { "filename": "MeshService-signed.exe", - "hash": "19F470D41D70288E7E95C8BC8066E68DD112DBCE8A5E7FBF9D1A3AB2FD2E47959820B8AB19835C6B951B036427331318", - "size": 3463488, - "mtime": "2022-01-07T23:07:37Z" + "hash": "93917AC2C4A3A6A034B39675FA658B0A67F480DDE7BA5607A75F6A711D7ADC553208D98678340796D48813D1F4B56A94", + "size": 3656000, + "mtime": "2022-02-13T20:24:29Z" }, "4": { "filename": "MeshService64-signed.exe", - "hash": "C0A2CB8FEFAA7414F1CD6D37E25CB8FE10D680F614FD0AA338BC2C0786EFC07C3BCE03BD4CBC075FD387B5642A135E25", - "size": 3079488, - "mtime": "2022-01-07T23:07:40Z" + "hash": "B7AC4F1A3A66D0C377CE8E19FC86A666E9BA85AE233C6278CDCA05D156B5F2E018EC5C9FAE2A5968F2E64D0D0417B4CD", + "size": 3272000, + "mtime": "2022-02-13T20:24:32Z" }, "5": { "filename": "meshagent_x86", @@ -132,3 +132,4 @@ "mtime": "2022-01-08T00:23:52Z" } } +0 diff --git a/agents/meshcore.js b/agents/meshcore.js index 055023a6..b7ee766a 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -171,6 +171,12 @@ var agentFileHttpRequests = {}; // Currently active agent HTTPS GET requests fro var agentFileHttpPendingRequests = []; // Pending HTTPS GET requests from the server. var debugConsole = (global._MSH && (_MSH().debugConsole == 1)); +var color_options = + { + background: (global._MSH != null) ? global._MSH().background : '0,54,105', + foreground: (global._MSH != null) ? global._MSH().foreground : '255,255,255' + }; + if (process.platform == 'win32' && require('user-sessions').isRoot()) { // Check the Agent Uninstall MetaData for correctness, as the installer may have written an incorrect value try { @@ -1091,7 +1097,7 @@ function handleServerCommand(data) { ipr.username = data.username; global._clientmessage = ipr.then(function (img) { - this.messagebox = require('win-dialog').create(this.title, this.message, this.username, { timeout: 120000, b64Image: img.split(',').pop() }); + this.messagebox = require('win-dialog').create(this.title, this.message, this.username, { timeout: 120000, b64Image: img.split(',').pop(), background: color_options.background, foreground: color_options.foreground }); this.__childPromise.addMessage = this.messagebox.addMessage.bind(this.messagebox); return (this.messagebox); }); @@ -2072,7 +2078,7 @@ function onTunnelData(data) { ipr.username = this.httprequest.realname; ipr.translations = { Allow: currentTranslation['allow'], Deny: currentTranslation['deny'], Auto: currentTranslation['autoAllowForFive'], Caption: consentMessage }; this.httprequest.tpromise._consent = ipr.then(function (img) { - this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), timeout: 30000, translations: this.translations }); + this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), timeout: 30000, translations: this.translations, background: color_options.background, foreground: color_options.foreground }); this.__childPromise.close = this.consent.close.bind(this.consent); return (this.consent); }); @@ -2372,7 +2378,7 @@ function onTunnelData(data) { this.httprequest.desktop.kvm.users.splice(i, 1); this.httprequest.desktop.kvm.connectionBar.removeAllListeners('close'); this.httprequest.desktop.kvm.connectionBar.close(); - this.httprequest.desktop.kvm.connectionBar = require('notifybar-desktop')(this.httprequest.privacybartext.replace('{0}', this.httprequest.desktop.kvm.rusers.join(', ')).replace('{1}', this.httprequest.desktop.kvm.users.join(', ')), require('MeshAgent')._tsid); + this.httprequest.desktop.kvm.connectionBar = require('notifybar-desktop')(this.httprequest.privacybartext.replace('{0}', this.httprequest.desktop.kvm.rusers.join(', ')).replace('{1}', this.httprequest.desktop.kvm.users.join(', ')), require('MeshAgent')._tsid, color_options); this.httprequest.desktop.kvm.connectionBar.httprequest = this.httprequest; this.httprequest.desktop.kvm.connectionBar.on('close', function () { MeshServerLogEx(29, null, "Remote Desktop Connection forcefully closed by local user (" + this.httprequest.remoteaddr + ")", this.httprequest); @@ -2433,7 +2439,7 @@ function onTunnelData(data) { ipr.username = this.httprequest.realname; ipr.translation = { Allow: currentTranslation['allow'], Deny: currentTranslation['deny'], Auto: currentTranslation['autoAllowForFive'], Caption: consentMessage }; pr = ipr.then(function (img) { - this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), uid: this.tsid, timeout: 30000, translations: this.translation }); + this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), uid: this.tsid, timeout: 30000, translations: this.translation, background: color_options.background, foreground: color_options.foreground }); this.__childPromise.close = this.consent.close.bind(this.consent); return (this.consent); }); @@ -2478,7 +2484,7 @@ function onTunnelData(data) { this.ws.httprequest.desktop.kvm.connectionBar.close(); } try { - this.ws.httprequest.desktop.kvm.connectionBar = require('notifybar-desktop')(this.ws.httprequest.privacybartext.replace('{0}', this.ws.httprequest.desktop.kvm.rusers.join(', ')).replace('{1}', this.ws.httprequest.desktop.kvm.users.join(', ')), require('MeshAgent')._tsid); + this.ws.httprequest.desktop.kvm.connectionBar = require('notifybar-desktop')(this.ws.httprequest.privacybartext.replace('{0}', this.ws.httprequest.desktop.kvm.rusers.join(', ')).replace('{1}', this.ws.httprequest.desktop.kvm.users.join(', ')), require('MeshAgent')._tsid, color_options); MeshServerLogEx(31, null, "Remote Desktop Connection Bar Activated/Updated (" + this.ws.httprequest.remoteaddr + ")", this.ws.httprequest); } catch (ex) { if (process.platform != 'darwin') { @@ -2530,7 +2536,7 @@ function onTunnelData(data) { this.httprequest.desktop.kvm.connectionBar.close(); } try { - this.httprequest.desktop.kvm.connectionBar = require('notifybar-desktop')(this.httprequest.privacybartext.replace('{0}', this.httprequest.desktop.kvm.rusers.join(', ')).replace('{1}', this.httprequest.desktop.kvm.users.join(', ')), require('MeshAgent')._tsid); + this.httprequest.desktop.kvm.connectionBar = require('notifybar-desktop')(this.httprequest.privacybartext.replace('{0}', this.httprequest.desktop.kvm.rusers.join(', ')).replace('{1}', this.httprequest.desktop.kvm.users.join(', ')), require('MeshAgent')._tsid, color_options); MeshServerLogEx(31, null, "Remote Desktop Connection Bar Activated/Updated (" + this.httprequest.remoteaddr + ")", this.httprequest); } catch (ex) { MeshServerLogEx(32, null, "Remote Desktop Connection Bar Failed or not Supported (" + this.httprequest.remoteaddr + ")", this.httprequest); @@ -2616,7 +2622,7 @@ function onTunnelData(data) { ipr.username = this.httprequest.realname; ipr.translations = { Allow: currentTranslation['allow'], Deny: currentTranslation['deny'], Auto: currentTranslation['autoAllowForFive'], Caption: consentMessage }; pr = ipr.then(function (img) { - this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), timeout: 30000, translations: this.translations }); + this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), timeout: 30000, translations: this.translations, background: color_options.background, foreground: color_options.foreground }); this.__childPromise.close = this.consent.close.bind(this.consent); return (this.consent); }); diff --git a/dependencies.txt b/dependencies.txt index 73fb93fb..2f0358fc 100644 --- a/dependencies.txt +++ b/dependencies.txt @@ -3,7 +3,7 @@ "compression": "^1.7.4", "cookie-session": "^1.4.0", "express": "^4.17.0", - "express-handlebars": "^3.1.0", + "express-handlebars": "^5.3.5", "express-ws": "^4.0.0", "ipcheck": "^0.1.0", "minimist": "^1.2.5", diff --git a/meshipkvm.js b/meshipkvm.js index a471554a..1522b7f6 100644 --- a/meshipkvm.js +++ b/meshipkvm.js @@ -223,9 +223,10 @@ function CreateIPKVMManager(parent) { if (obj.managedPorts[nodeid] != null) { // This port is no longer connected parent.ClearConnectivityState(sender.meshid, nodeid, 1, null, null); + const mesh = parent.webserver.meshes[sender.meshid]; // If the device group policy is set to auto-remove devices, remove it now - if ((mesh.flags) && (mesh.flags & 1)) { // Auto-remove devices + if ((mesh != null) && (mesh.flags) && (mesh.flags & 1)) { // Auto-remove devices parent.db.Remove(nodeid); // Remove node with that id parent.db.Remove('nt' + nodeid); // Remove notes parent.db.Remove('lc' + nodeid); // Remove last connect time diff --git a/package.json b/package.json index c8d8865a..eb96de93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.9.79", + "version": "0.9.83", "keywords": [ "Remote Device Management", "Remote Device Monitoring", @@ -41,7 +41,7 @@ "compression": "^1.7.4", "cookie-session": "^1.4.0", "express": "^4.17.0", - "express-handlebars": "^3.1.0", + "express-handlebars": "^5.3.5", "express-ws": "^4.0.0", "ipcheck": "^0.1.0", "minimist": "^1.2.5", diff --git a/public/styles/style.css b/public/styles/style.css index 42a54a08..1a14d8ec 100644 --- a/public/styles/style.css +++ b/public/styles/style.css @@ -3217,3 +3217,12 @@ a { .night .thermalSensor { color: #000; } + +.desktopButtons { + padding-top: 2px; +} + + .night .desktopButtons { + filter: invert(60%); + -webkit-filter: invert(60%); + } \ No newline at end of file diff --git a/translate/translate.json b/translate/translate.json index 3ba33dff..77a89d3b 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -956,6 +956,7 @@ }, { "en": ", 16 grays", + "nl": ", 16 grijstinten", "ru": ", 16 оттенков серого", "xloc": [ "player.handlebars->3->35" @@ -963,6 +964,7 @@ }, { "en": ", 256 grays", + "nl": ", 256 grijstinten", "ru": ", 256 оттенков серого", "xloc": [ "player.handlebars->3->36" @@ -1776,6 +1778,7 @@ }, { "en": "1 byte-per-pixel", + "nl": "1 byte per pixel", "ru": "1 байт на пиксель", "xloc": [ "player.handlebars->3->34" @@ -2630,6 +2633,7 @@ }, { "en": "2 byte-per-pixel", + "nl": "2 byte per pixel", "ru": "2 байта на пиксель", "xloc": [ "player.handlebars->3->33" @@ -13711,6 +13715,7 @@ }, { "en": "Closed desktop multiplex session \\\"{0}\\\", {1} second(s)", + "nl": "Gesloten desktop multiplexsessie \\\"{0}\\\", {1} seconde(n)", "xloc": [ "default.handlebars->39->2277" ] @@ -23774,6 +23779,7 @@ }, { "en": "Encoding Quality", + "nl": "Coderingskwaliteit", "ru": "Качество кодирования", "xloc": [ "player.handlebars->3->37" @@ -26115,6 +26121,7 @@ }, { "en": "Finished recording session \\\"{0}\\\", {1} second(s)", + "nl": "Beëindigde opnamesessie \\\"{0}\\\", {1} seconde(n)", "xloc": [ "default.handlebars->39->2276" ] @@ -28212,6 +28219,13 @@ "default.handlebars->39->2469" ] }, + { + "en": "Group Name", + "nl": "Groepsnaam", + "xloc": [ + "agent-translations.json" + ] + }, { "cs": "Skupina vytvořená", "da": "Gruppér efter", @@ -33311,6 +33325,7 @@ }, { "en": "Joined desktop multiplex session \\\"{0}\\\"", + "nl": "Deelgenomen aan desktop multiplex-sessie \\\"{0}\\\"", "xloc": [ "default.handlebars->39->2273" ] @@ -34971,6 +34986,7 @@ }, { "en": "Left the desktop multiplex session \\\"{0}\\\" after {1} second(s).", + "nl": "Verliet de desktop multiplexsessie \\\"{0}\\\" na {1} seconde(n).", "xloc": [ "default.handlebars->39->2274" ] @@ -38128,6 +38144,7 @@ }, { "en": "Maximum keys reached.", + "nl": "Maximum aantal sleutels bereikt.", "xloc": [ "default.handlebars->39->217" ] @@ -38347,10 +38364,7 @@ "sv": "Masknamn", "tr": "Mesh Adı", "zh-chs": "网格名称", - "zh-cht": "網格名稱", - "xloc": [ - "agent-translations.json" - ] + "zh-cht": "網格名稱" }, { "cs": "Mesh předávání (relay)", @@ -55906,7 +55920,7 @@ "tr": "Karanlık modu ayarla", "zh-chs": "设置深色模式", "xloc": [ - "default-mobile.handlebars->container->page_content->column_l->p3->p3info->3->p3AccountActions->p2AccountActions->3->11->0" + "default-mobile.handlebars->container->page_content->column_l->p3->p3info->3->p3AccountActions->p2AccountActions->3->setDarkModeLink->0" ] }, { @@ -58774,6 +58788,7 @@ }, { "en": "Started desktop multiplex session \\\"{0}\\\"", + "nl": "Startte een Desktop multiplexsessie \\\"{0}\\\"", "xloc": [ "default.handlebars->39->2275" ] diff --git a/views/default.handlebars b/views/default.handlebars index 32ff5be7..d0e3e492 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -668,19 +668,19 @@       - - - - - - - - - - - - - + + + + + + + + + + + + +
@@ -2121,7 +2121,7 @@ if (userinfo.otphkeys > 0) { authFactorCount += userinfo.otphkeys; } // FIDO hardware factor if ((features & 0x00800000) && (userinfo.otpekey == 1)) { authFactorCount++; } // EMail factor if ((features & 0x02000000) && (features & 0x04000000) && (userinfo.phone != null)) { authFactorCount++; } // SMS factor - if ((authFactorCount > 0) && (userinfo.otpkeys > 0) && ((features & 0x40000) == 0)) { authFactorCount++; } // Backup keys + if ((authFactorCount > 0) && (userinfo.otpkeys > 0) && ((features2 & 0x40000) == 0)) { authFactorCount++; } // Backup keys return authFactorCount; } @@ -17216,6 +17216,11 @@ } } + // Request Confirmation if closing while a desktop, terminal session is active + window.addEventListener('beforeunload', function (e) { + if (((desktop != null) && (xxcurrentView == 11)) || ((terminal != null) && (xxcurrentView == 12))) { e.preventDefault(); e.returnValue = ''; } + }); + \ No newline at end of file diff --git a/webserver.js b/webserver.js index d281de51..fec5da0a 100644 --- a/webserver.js +++ b/webserver.js @@ -5587,7 +5587,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF } // Setup middleware - obj.app.engine('handlebars', obj.exphbs({ defaultLayout: null })); // defaultLayout: 'main' + obj.app.engine('handlebars', obj.exphbs({ defaultLayout: false })); obj.app.set('view engine', 'handlebars'); if (obj.args.trustedproxy) { // Reverse proxy should add the "X-Forwarded-*" headers