diff --git a/package.json b/package.json index 67fc1b12..fdef964a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.2.4-a", + "version": "0.2.4-b", "keywords": [ "Remote Management", "Intel AMT", diff --git a/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.application b/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.application similarity index 85% rename from public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.application rename to public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.application index ce304f52..4d9757a0 100644 --- a/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.application +++ b/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.application @@ -1,20 +1,20 @@  - + - - + + - MRs3i+wWL3/q3ug0vDLnjcM9sWnwJ7cH8RmaFbWEqBs= + OrVnTQLTKIxVLZNkTlIIvRGSS1WhevCMECD0a58kSYI= diff --git a/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.exe.config.deploy b/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.exe.config.deploy similarity index 100% rename from public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.exe.config.deploy rename to public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.exe.config.deploy diff --git a/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.exe.deploy b/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.exe.deploy similarity index 87% rename from public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.exe.deploy rename to public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.exe.deploy index 431b926e..128e5646 100644 Binary files a/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.exe.deploy and b/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.exe.deploy differ diff --git a/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.exe.manifest b/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.exe.manifest similarity index 91% rename from public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.exe.manifest rename to public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.exe.manifest index a62d2369..36d5630b 100644 --- a/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.exe.manifest +++ b/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.exe.manifest @@ -1,10 +1,10 @@  - + - + @@ -44,13 +44,13 @@ - + - 9CBRw9I6oJzioNiqBO2hWNS8fPrKJs8WKO4N99KM6NY= + 06I3GLTLWQ3HjlpCbxpboVtNzeTJZ6nWgSqw191sAuE= diff --git a/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.ico.deploy b/public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.ico.deploy similarity index 100% rename from public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_18/MeshMiniRouter.ico.deploy rename to public/clickonce/minirouter/Application Files/MeshMiniRouter_2_0_0_19/MeshMiniRouter.ico.deploy diff --git a/public/clickonce/minirouter/MeshMiniRouter.application b/public/clickonce/minirouter/MeshMiniRouter.application index ce304f52..4d9757a0 100644 --- a/public/clickonce/minirouter/MeshMiniRouter.application +++ b/public/clickonce/minirouter/MeshMiniRouter.application @@ -1,20 +1,20 @@  - + - - + + - MRs3i+wWL3/q3ug0vDLnjcM9sWnwJ7cH8RmaFbWEqBs= + OrVnTQLTKIxVLZNkTlIIvRGSS1WhevCMECD0a58kSYI= diff --git a/public/clickonce/minirouter/publish.htm b/public/clickonce/minirouter/publish.htm index 7c4e5986..15e7497c 100644 --- a/public/clickonce/minirouter/publish.htm +++ b/public/clickonce/minirouter/publish.htm @@ -59,7 +59,7 @@ FONT.key {font-weight: bold; color: darkgreen}
-
 
Name:MeshCentral Mini-Router
 
Version:2.0.0.18
 
Publisher:Meshcentral.com
 
+
 
Name:MeshCentral Mini-Router
 
Version:2.0.0.19
 
Publisher:Meshcentral.com
 
diff --git a/views/default.handlebars b/views/default.handlebars index d780e08d..bcdf2659 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -1282,7 +1282,7 @@ case 'getcookie': { if (message.tag == 'clickonce') { var basicPort = "{{{serverRedirPort}}}" == "" ? "{{{serverPublicPort}}}" : "{{{serverRedirPort}}}"; - var rdpurl = "http://" + window.location.hostname + ":" + basicPort + "/clickonce/minirouter/MeshMiniRouter.application?WS=wss%3A%2F%2F" + window.location.hostname + "%2Fmeshrelay.ashx%3Fauth=" + message.cookie + "&CH={{{webcerthash}}}&AP=" + message.protocol + ((debugmode == 1)?"":"&HOL=1"); + var rdpurl = "http://" + window.location.hostname + ":" + basicPort + "/clickonce/minirouter/MeshMiniRouter.application?WS=wss%3A%2F%2F" + window.location.hostname + "%2Fmeshrelay.ashx%3Fauth=" + message.cookie + "&CH={{{webcerthash}}}&AP=" + message.protocol + ((debugmode == 1) ? "" : "&HOL=1"); window.open(rdpurl, '_blank'); } break; @@ -3229,6 +3229,7 @@ if (((meshrights & 8) != 0) && (mesh.mtype == 2)) x += 'Router '; // RDP link, show this link only of the remote machine is Windows. + console.log(((connectivity & 1) != 0), (clickOnce == true), (mesh.mtype == 2), ((meshrights & 8) != 0)); if (((connectivity & 1) != 0) && (clickOnce == true) && (mesh.mtype == 2) && ((meshrights & 8) != 0)) { if ((node.agent.id > 0) && (node.agent.id < 5)) { x += 'RDP '; } if (node.agent.id > 4) { @@ -6460,7 +6461,7 @@ function addLinkConditional(x, f, c) { if (c) return addLink(x, f); return x; } function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; } function addOption(q, t, i) { var option = document.createElement("option"); option.text = t; option.value = i; Q(q).add(option); } - function passwordcheck(p) { var re = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/; return re.test(p); } + function passwordcheck(p) { return (p.length > 7) && (/\d/.test(p)) && (/[a-z]/.test(p)) && (/[A-Z]/.test(p)) && (/\W/.test(p)); } function methodcheck(r) { if (r && r != null && r.Body && r.Body.ReturnValueStr != "SUCCESS") { messagebox("Call Error", r.Header.Method + ": " + r.Body.ReturnValueStr.replace("_", " ")); return true; } return false; } function TableStart() { return "

"; } function TableStart2() { return "

"; } diff --git a/webserver.js b/webserver.js index 39bd6098..31dcd67d 100644 --- a/webserver.js +++ b/webserver.js @@ -107,7 +107,6 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { obj.webCertificateHashBase64 = new Buffer(obj.webCertificateHash, 'binary').toString('base64').replace(/\+/g, '@').replace(/\//g, '$'); obj.webCertificateFullHash = parent.certificateOperations.getCertHashBinary(obj.certificates.web.cert); obj.webCertificateFullHashs = { '': obj.webCertificateFullHash }; - obj.webCertificateFullHashBase64 = new Buffer(obj.webCertificateFullHash, 'binary').toString('base64').replace(/\+/g, '@').replace(/\//g, '$'); obj.agentCertificateHashHex = parent.certificateOperations.getPublicKeyHash(obj.certificates.agent.cert); obj.agentCertificateHashBase64 = new Buffer(obj.agentCertificateHashHex, 'hex').toString('base64').replace(/\+/g, '@').replace(/\//g, '$'); obj.agentCertificateAsn1 = parent.certificateOperations.forge.asn1.toDer(parent.certificateOperations.forge.pki.certificateToAsn1(parent.certificateOperations.forge.pki.certificateFromPem(parent.certificates.agent.cert))).getBytes(); @@ -132,9 +131,6 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { } } - //console.log(new Buffer(obj.webCertificateHashs['devtest'], 'binary').toString('hex')); - //console.log(new Buffer(obj.webCertificateFullHashs['devtest'], 'binary').toString('hex')); - // If we are running the legacy swarm server, compute the hash for that certificate if (parent.certificates.swarmserver != null) { obj.swarmCertificateAsn1 = parent.certificateOperations.forge.asn1.toDer(parent.certificateOperations.forge.pki.certificateToAsn1(parent.certificateOperations.forge.pki.certificateFromPem(parent.certificates.swarmserver.cert))).getBytes(); @@ -759,14 +755,14 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { if (obj.args.minify && !req.query.nominify) { // Try to server the minified version if we can. try { - res.render(obj.path.join(__dirname, isMobileBrowser(req) ? 'views/default-mobile-min' : 'views/default-min'), { viewmode: viewmode, currentNode: currentNode, logoutControl: logoutcontrol, title: domain.title, title2: domain.title2, domainurl: domain.url, domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: getWebServerName(domain), serverRedirPort: args.redirport, serverPublicPort: httpsPort, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, sessiontime: args.sessiontime, mpspass: args.mpspass, webcerthash: obj.webCertificateHashBase64, footer: (domain.footer == null) ? '' : domain.footer }); + res.render(obj.path.join(__dirname, isMobileBrowser(req) ? 'views/default-mobile-min' : 'views/default-min'), { viewmode: viewmode, currentNode: currentNode, logoutControl: logoutcontrol, title: domain.title, title2: domain.title2, domainurl: domain.url, domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: getWebServerName(domain), serverRedirPort: args.redirport, serverPublicPort: httpsPort, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, sessiontime: args.sessiontime, mpspass: args.mpspass, webcerthash: new Buffer(obj.webCertificateFullHashs[domain.id], 'binary').toString('base64').replace(/\+/g, '@').replace(/\//g, '$'), footer: (domain.footer == null) ? '' : domain.footer }); } catch (ex) { // In case of an exception, serve the non-minified version. - res.render(obj.path.join(__dirname, isMobileBrowser(req) ? 'views/default-mobile' : 'views/default'), { viewmode: viewmode, currentNode: currentNode, logoutControl: logoutcontrol, title: domain.title, title2: domain.title2, domainurl: domain.url, domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: getWebServerName(domain), serverRedirPort: args.redirport, serverPublicPort: httpsPort, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, sessiontime: args.sessiontime, mpspass: args.mpspass, webcerthash: obj.webCertificateHashBase64, footer: (domain.footer == null) ? '' : domain.footer }); + res.render(obj.path.join(__dirname, isMobileBrowser(req) ? 'views/default-mobile' : 'views/default'), { viewmode: viewmode, currentNode: currentNode, logoutControl: logoutcontrol, title: domain.title, title2: domain.title2, domainurl: domain.url, domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: getWebServerName(domain), serverRedirPort: args.redirport, serverPublicPort: httpsPort, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, sessiontime: args.sessiontime, mpspass: args.mpspass, webcerthash: new Buffer(obj.webCertificateFullHashs[domain.id], 'binary').toString('base64').replace(/\+/g, '@').replace(/\//g, '$'), footer: (domain.footer == null) ? '' : domain.footer }); } } else { // Serve non-minified version of web pages. - res.render(obj.path.join(__dirname, isMobileBrowser(req) ? 'views/default-mobile' : 'views/default'), { viewmode: viewmode, currentNode: currentNode, logoutControl: logoutcontrol, title: domain.title, title2: domain.title2, domainurl: domain.url, domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: getWebServerName(domain), serverRedirPort: args.redirport, serverPublicPort: httpsPort, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, sessiontime: args.sessiontime, mpspass: args.mpspass, webcerthash: obj.webCertificateHashBase64, footer: (domain.footer == null) ? '' : domain.footer }); + res.render(obj.path.join(__dirname, isMobileBrowser(req) ? 'views/default-mobile' : 'views/default'), { viewmode: viewmode, currentNode: currentNode, logoutControl: logoutcontrol, title: domain.title, title2: domain.title2, domainurl: domain.url, domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: getWebServerName(domain), serverRedirPort: args.redirport, serverPublicPort: httpsPort, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, sessiontime: args.sessiontime, mpspass: args.mpspass, webcerthash: new Buffer(obj.webCertificateFullHashs[domain.id], 'binary').toString('base64').replace(/\+/g, '@').replace(/\//g, '$'), footer: (domain.footer == null) ? '' : domain.footer }); } } else { // Send back the login application