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++; 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,