From 51e0adc7d8d247acbf500ea91f2cd44aeeb22f8c Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sun, 17 Jul 2022 20:13:14 -0700 Subject: [PATCH] Fixed exception is GetSidByteArray() in meshcmd, used in meshcmd amtauditlog. --- agents/modules_meshcmd/amt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agents/modules_meshcmd/amt.js b/agents/modules_meshcmd/amt.js index 9a027fba..03102d1d 100644 --- a/agents/modules_meshcmd/amt.js +++ b/agents/modules_meshcmd/amt.js @@ -987,8 +987,8 @@ function AmtStackCreateService(wsmanStack) { // Convert a byte array of SID into string function GetSidString(sid) { - var r = "S-" + sid.charCodeAt(0) + "-" + sid.charCodeAt(7); - for (var i = 2; i < (sid.length / 4); i++) r += "-" + ReadIntX(sid, i * 4); + var r = 'S-' + sid[0] + '-' + sid[7]; + for (var i = 2; i < (sid.length / 4); i++) r += '-' + ReadIntX(sid, i * 4); return r; }