Updated MeshCentral Router and Assistant

This commit is contained in:
Ylian Saint-Hilaire 2020-11-03 21:32:12 -08:00
parent 1b590dba5e
commit 369f51c67d
4 changed files with 4 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1404,6 +1404,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
const responseCmd = { action: 'meshToolInfo', name: command.name, hash: info.hash, size: info.size, url: info.url };
if (command.cookie === true) { responseCmd.url += ('&auth=' + parent.parent.encodeCookie({ download: info.dlname }, parent.parent.loginCookieEncryptionKey)); }
if (command.pipe === true) { responseCmd.pipe = true; }
if (parent.webCertificateHashs[domain.id] != null) { responseCmd.serverhash = Buffer.from(parent.webCertificateHashs[domain.id], 'binary').toString('hex'); }
try { ws.send(JSON.stringify(responseCmd)); } catch (ex) { }
break;
}

View File

@ -5002,7 +5002,9 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
case 'meshToolInfo': {
if (typeof command.name != 'string') break;
var info = parent.parent.meshToolsBinaries[command.name];
try { ws.send(JSON.stringify({ action: 'meshToolInfo', name: command.name, hash: info.hash, size: info.size, url: info.url })); } catch (ex) { }
var responseCmd = { action: 'meshToolInfo', name: command.name, hash: info.hash, size: info.size, url: info.url };
if (parent.webCertificateHashs[domain.id] != null) { responseCmd.serverhash = Buffer.from(parent.webCertificateHashs[domain.id], 'binary').toString('hex'); }
try { ws.send(JSON.stringify(responseCmd)); } catch (ex) { }
break;
}
default: {