From c515d3c2a42db3cc914047beb4cf47c817e4bc07 Mon Sep 17 00:00:00 2001 From: jsastriawan Date: Tue, 26 Nov 2019 15:38:03 -0700 Subject: [PATCH 1/2] Update apfserver node search to fix authentication issue --- apfserver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apfserver.js b/apfserver.js index a4728b6a..4cd3e7eb 100644 --- a/apfserver.js +++ b/apfserver.js @@ -282,7 +282,7 @@ module.exports.CreateApfServer = function (parent, db, args) { }); } else if (mesh.mtype == 2) { // If this is a agent mesh, search the mesh for this device UUID // Intel AMT GUID (socket.tag.SystemId) will be used to search the node - obj.db.getAmtUuidNode(mesh._id, socket.tag.SystemId, function (err, nodes) { // TODO: May need to optimize this request with indexes + obj.db.getAmtUuidNode(socket.tag.SystemId, function (err, nodes) { // TODO: May need to optimize this request with indexes if ((nodes == null) || (nodes.length !== 1)) { // New APF connection for unknown node, disconnect. unknownNodeCount++; From 7be2e3d9ac8360c3d882b71182f758e987393924 Mon Sep 17 00:00:00 2001 From: Ryan Blenis Date: Wed, 27 Nov 2019 13:18:18 -0500 Subject: [PATCH 2/2] Fix MeshCentral version comparisons. (Breaking for versions -a through -c) --- pluginHandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pluginHandler.js b/pluginHandler.js index 4b50010f..3d1e7e08 100644 --- a/pluginHandler.js +++ b/pluginHandler.js @@ -285,8 +285,8 @@ module.exports.pluginHandler = function (parent) { var s = require('semver'); // MeshCentral doesn't adhere to semantic versioning (due to the - at the end of the version) // Convert the letter to ASCII for a "true" version number comparison - var mcCurVer = parent.currentVer.replace(/-(.)$/, (m, p1) => { return p1.charCodeAt(0); }); - var piCompatVer = newconf.meshCentralCompat.replace(/-(.)\b/g, (m, p1) => { return p1.charCodeAt(0); }); + var mcCurVer = parent.currentVer.replace(/-(.)$/, (m, p1) => { return ("000" + p1.charCodeAt(0)).substr(-3,3); }); + var piCompatVer = newconf.meshCentralCompat.replace(/-(.)\b/g, (m, p1) => { return ("000" + p1.charCodeAt(0)).substr(-3,3); }); latestRet.push({ 'id': curconf._id, 'installedVersion': curconf.version,