diff --git a/MeshCentralServer.njsproj b/MeshCentralServer.njsproj index ce5b9555..8af4c236 100644 --- a/MeshCentralServer.njsproj +++ b/MeshCentralServer.njsproj @@ -38,7 +38,6 @@ - diff --git a/agents/modules_meshcmd/amt-xml.js b/agents/modules_meshcmd/amt-xml.js index db8c696f..23c60f96 100644 --- a/agents/modules_meshcmd/amt-xml.js +++ b/agents/modules_meshcmd/amt-xml.js @@ -33,7 +33,8 @@ module.exports.ParseWsman = function (xml) { if (!body) return null; if (body.childNodes.length > 0) { t = body.childNodes[0].localName; - if (t.indexOf("_OUTPUT") == t.length - 7) { t = t.substring(0, t.length - 7); } + var x = t.indexOf('_OUTPUT'); + if ((x != -1) && (x == (t.length - 7))) { t = t.substring(0, t.length - 7); } r.Header['Method'] = t; r.Body = _ParseWsmanRec(body.childNodes[0]); } diff --git a/agents/modules_meshcore/amt-xml.js b/agents/modules_meshcore/amt-xml.js index 26f91ea3..9e7c9d63 100644 --- a/agents/modules_meshcore/amt-xml.js +++ b/agents/modules_meshcore/amt-xml.js @@ -33,7 +33,8 @@ module.exports.ParseWsman = function (xml) { if (!body) return null; if (body.childNodes.length > 0) { t = body.childNodes[0].localName; - if (t.indexOf("_OUTPUT") == t.length - 7) { t = t.substring(0, t.length - 7); } + var x = t.indexOf('_OUTPUT'); + if ((x != -1) && (x == (t.length - 7))) { t = t.substring(0, t.length - 7); } r.Header['Method'] = t; r.Body = _ParseWsmanRec(body.childNodes[0]); } diff --git a/amt/amt-xml.js b/amt/amt-xml.js index 5e4a20c5..eaba2df8 100644 --- a/amt/amt-xml.js +++ b/amt/amt-xml.js @@ -36,7 +36,8 @@ module.exports.ParseWsman = function (xml) { if (!body) return null; if (body.childNodes.length > 0) { t = body.childNodes[0].localName; - if (t.indexOf("_OUTPUT") == t.length - 7) { t = t.substring(0, t.length - 7); } + var x = t.indexOf('_OUTPUT'); + if ((x != -1) && (x == (t.length - 7))) { t = t.substring(0, t.length - 7); } r.Header['Method'] = t; r.Body = _ParseWsmanRec(body.childNodes[0]); } diff --git a/amtevents.js b/amtevents.js index b6f83d5d..ab045383 100644 --- a/amtevents.js +++ b/amtevents.js @@ -34,7 +34,8 @@ module.exports.CreateAmtEventsHandler = function (parent) { if (!body) return null; if (body.childNodes.length > 0) { t = body.childNodes[0].localName; - if (t.indexOf("_OUTPUT") == t.length - 7) { t = t.substring(0, t.length - 7); } + var x = t.indexOf('_OUTPUT'); + if ((x != -1) && (x == (t.length - 7))) { t = t.substring(0, t.length - 7); } r.Header.Method = t; r.Body = _ParseWsmanRec(body.childNodes[0]); } diff --git a/public/commander.htm b/public/commander.htm index 4dc9dbec..b001bac1 100644 --- a/public/commander.htm +++ b/public/commander.htm @@ -1,4 +1,4 @@ -
  
Disconnected