mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 07:05:52 -05:00
Fixed MeshCMD amtconfig occasionally not matching the device group.
This commit is contained in:
parent
8ec41c7046
commit
51bdd97780
12
mpsserver.js
12
mpsserver.js
@ -603,8 +603,16 @@ module.exports.CreateMpsServer = function (parent, db, args, certificates) {
|
|||||||
SendUserAuthFail(socket);
|
SendUserAuthFail(socket);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
var meshIdStart = '/' + username, mesh = null;
|
// Find the device group for this CIRA connection. Since Intel AMT does not allow @ or $ in the username, we escape these.
|
||||||
if (obj.parent.webserver.meshes) { for (var i in obj.parent.webserver.meshes) { if (obj.parent.webserver.meshes[i]._id.replace(/\@/g, 'X').replace(/\$/g, 'X').indexOf(meshIdStart) > 0) { mesh = obj.parent.webserver.meshes[i]; break; } } }
|
// For possible for CIRA-LMS connections to still send @ or $, so we need to escape both sides.
|
||||||
|
var meshIdStart = ('/' + username).replace(/\@/g, 'X').replace(/\$/g, 'X'), mesh = null;
|
||||||
|
if (obj.parent.webserver.meshes) {
|
||||||
|
for (var i in obj.parent.webserver.meshes) {
|
||||||
|
if (obj.parent.webserver.meshes[i]._id.replace(/\@/g, 'X').replace(/\$/g, 'X').indexOf(meshIdStart) > 0) {
|
||||||
|
mesh = obj.parent.webserver.meshes[i]; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mesh == null) {
|
if (mesh == null) {
|
||||||
meshNotFoundCount++;
|
meshNotFoundCount++;
|
||||||
socket.ControlMsg({ action: 'console', msg: 'Device group not found' });
|
socket.ControlMsg({ action: 'console', msg: 'Device group not found' });
|
||||||
|
Loading…
Reference in New Issue
Block a user