1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Fixed device group not found bug, #2948

This commit is contained in:
Ylian Saint-Hilaire 2021-07-29 15:51:40 -07:00
parent 56a51735eb
commit 58039c4c1a
2 changed files with 10 additions and 15 deletions

View file

@ -3978,8 +3978,8 @@ function processConsoleCommand(cmd, args, rights, sessionid) {
var rx = '';
var apfarg = {
mpsurl: mesh.ServerUrl.replace('agent.ashx', 'apf.ashx'),
mpsuser: Buffer.from(mesh.ServerInfo.MeshID, 'hex').toString('base64').substring(0, 16),
mpspass: Buffer.from(mesh.ServerInfo.MeshID, 'hex').toString('base64').substring(0, 16),
mpsuser: Buffer.from(mesh.ServerInfo.MeshID, 'hex').toString('base64').substring(0, 16).replace(/\+/g, '@').replace(/\//g, '$'),
mpspass: Buffer.from(mesh.ServerInfo.MeshID, 'hex').toString('base64').substring(0, 16).replace(/\+/g, '@').replace(/\//g, '$'),
mpskeepalive: 60000,
clientname: state.OsHostname,
clientaddress: '127.0.0.1',
@ -4018,8 +4018,8 @@ function processConsoleCommand(cmd, args, rights, sessionid) {
if (connType >= 0) { // Connect
var apfarg = {
mpsurl: mesh.ServerUrl.replace('agent.ashx', 'apf.ashx'),
mpsuser: Buffer.from(mesh.ServerInfo.MeshID, 'hex').toString('base64').substring(0, 16),
mpspass: Buffer.from(mesh.ServerInfo.MeshID, 'hex').toString('base64').substring(0, 16),
mpsuser: Buffer.from(mesh.ServerInfo.MeshID, 'hex').toString('base64').substring(0, 16).replace(/\+/g, '@').replace(/\//g, '$'),
mpspass: Buffer.from(mesh.ServerInfo.MeshID, 'hex').toString('base64').substring(0, 16).replace(/\+/g, '@').replace(/\//g, '$'),
mpskeepalive: 60000,
clientname: require('os').hostname(),
clientaddress: '127.0.0.1',