GitHub Security fixes.

This commit is contained in:
Ylian Saint-Hilaire 2020-09-15 17:56:10 -07:00
parent af6fde0bef
commit 43b78d210e
8 changed files with 910 additions and 889 deletions

View File

@ -38,7 +38,6 @@
<Compile Include="agents\modules_meshcmd\identifiers.js" /> <Compile Include="agents\modules_meshcmd\identifiers.js" />
<Compile Include="agents\modules_meshcmd\smbios.js" /> <Compile Include="agents\modules_meshcmd\smbios.js" />
<Compile Include="agents\modules_meshcmd\sysinfo.js" /> <Compile Include="agents\modules_meshcmd\sysinfo.js" />
<Compile Include="agents\modules_meshcmd\user-sessions.js" />
<Compile Include="agents\modules_meshcmd_min\amt-ider.min.js" /> <Compile Include="agents\modules_meshcmd_min\amt-ider.min.js" />
<Compile Include="agents\modules_meshcmd_min\amt-lme.min.js" /> <Compile Include="agents\modules_meshcmd_min\amt-lme.min.js" />
<Compile Include="agents\modules_meshcmd_min\amt-mei.min.js" /> <Compile Include="agents\modules_meshcmd_min\amt-mei.min.js" />

View File

@ -33,7 +33,8 @@ module.exports.ParseWsman = function (xml) {
if (!body) return null; if (!body) return null;
if (body.childNodes.length > 0) { if (body.childNodes.length > 0) {
t = body.childNodes[0].localName; 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.Header['Method'] = t;
r.Body = _ParseWsmanRec(body.childNodes[0]); r.Body = _ParseWsmanRec(body.childNodes[0]);
} }

View File

@ -33,7 +33,8 @@ module.exports.ParseWsman = function (xml) {
if (!body) return null; if (!body) return null;
if (body.childNodes.length > 0) { if (body.childNodes.length > 0) {
t = body.childNodes[0].localName; 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.Header['Method'] = t;
r.Body = _ParseWsmanRec(body.childNodes[0]); r.Body = _ParseWsmanRec(body.childNodes[0]);
} }

View File

@ -36,7 +36,8 @@ module.exports.ParseWsman = function (xml) {
if (!body) return null; if (!body) return null;
if (body.childNodes.length > 0) { if (body.childNodes.length > 0) {
t = body.childNodes[0].localName; 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.Header['Method'] = t;
r.Body = _ParseWsmanRec(body.childNodes[0]); r.Body = _ParseWsmanRec(body.childNodes[0]);
} }

View File

@ -34,7 +34,8 @@ module.exports.CreateAmtEventsHandler = function (parent) {
if (!body) return null; if (!body) return null;
if (body.childNodes.length > 0) { if (body.childNodes.length > 0) {
t = body.childNodes[0].localName; 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.Header.Method = t;
r.Body = _ParseWsmanRec(body.childNodes[0]); r.Body = _ParseWsmanRec(body.childNodes[0]);
} }

File diff suppressed because one or more lines are too long

View File

@ -803,7 +803,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
// Private method // Private method
obj.MuchTheSame = function (a, b) { return (Math.abs(a - b) < 4); } obj.MuchTheSame = function (a, b) { return (Math.abs(a - b) < 4); }
obj.Debug = function (msg) { console.log(msg); } obj.Debug = function (msg) { console.log(msg); }
obj.getIEVersion = function () { var r = -1; if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) r = parseFloat(RegExp.$1); } return r; } obj.getIEVersion = function () { var r = -1; if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"); if (re.exec(ua) != null) r = parseFloat(RegExp.$1); } return r; }
obj.haltEvent = function (e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; } obj.haltEvent = function (e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
return obj; return obj;

View File

@ -117,7 +117,8 @@ var WsmanStackCreateService = function (host, port, user, pass, tls, extra) {
if (!body) return null; if (!body) return null;
if (body.childNodes.length > 0) { if (body.childNodes.length > 0) {
t = body.childNodes[0].localName; 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.Header['Method'] = t;
r.Body = _ParseWsmanRec(body.childNodes[0]); r.Body = _ParseWsmanRec(body.childNodes[0]);
} }