From 43b78d210e94c0040ac4299d61e2d007a6af92be Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 15 Sep 2020 17:56:10 -0700 Subject: [PATCH] GitHub Security fixes. --- MeshCentralServer.njsproj | 1 - agents/modules_meshcmd/amt-xml.js | 3 +- agents/modules_meshcore/amt-xml.js | 3 +- amt/amt-xml.js | 3 +- amtevents.js | 3 +- public/commander.htm | 1781 +++++++++++++------------ public/scripts/agent-desktop-0.0.2.js | 2 +- public/scripts/amt-wsman-0.2.0.js | 3 +- 8 files changed, 910 insertions(+), 889 deletions(-) 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