From da604d6bc08a5e1630aedeb44896aff7232550ec Mon Sep 17 00:00:00 2001 From: bennyc-huji <108459999+bennyc-huji@users.noreply.github.com> Date: Tue, 8 Nov 2022 11:18:08 +0200 Subject: [PATCH] fix of bug that crashes the meshcentral when there is only digits and one comma on the version of the amt --- amtscanner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amtscanner.js b/amtscanner.js index 941aef7e..cdce1f54 100644 --- a/amtscanner.js +++ b/amtscanner.js @@ -362,8 +362,8 @@ module.exports.CreateAmtScanner = function (parent) { if (oldVer == newVer) return false; // Versions are same already, don't update. if (newVer == undefined || newVer == null) return false; // New version is bad, don't update it. if (oldVer == undefined || oldVer == null) return true; // Old version is no good anyway, update it. - var oldVerArr = oldVer.split('.'); - var newVerArr = newVer.split('.'); + var oldVerArr = oldVer.toString().split('.'); + var newVerArr = newVer.toString().split('.'); if ((oldVerArr.length < 2) || (newVerArr.length < 2)) return false; if ((oldVerArr[0] != newVerArr[0]) || (oldVerArr[1] != newVerArr[1])) return true; if (newVerArr.length > oldVerArr.length) return true;