Fixed Intel AMT event log parsing exception.

Ylian Saint-Hilaire committed Jul 18, 2021 at 18:02 UTC 834544b2b2da07c08bdb61fbfcab3e35c6f7ca7c
2 files changed +2 -3
agents/modules_meshcmd/amt.js
+1 -1
@@ -488,7 +488,7 @@ function AmtStackCreateService(wsmanStack) {
488 function _GetMessageLog1(stack, name, responses, status, tag) {
489 if (status != 200 || responses.Body["ReturnValue"] != '0') { tag[0](obj, null, tag[2], status); return; }
490 var i, j, x, e, AmtMessages = tag[2], t = new Date(), TimeStamp, ra = responses.Body["RecordArray"];
491 - if (typeof ra === 'string') { responses.Body["RecordArray"] = [responses.Body["RecordArray"]]; }
491 + if (typeof ra === 'string') { ra = [ra]; }
492
493 for (i in ra) {
494 e = Buffer.from(ra[i], 'base64');
redirserver.js
+1 -2
@@ -113,14 +113,13 @@ module.exports.CreateRedirServer = function (parent, db, args, func) {
113 if (parent.config.domains[i].dns != null) { continue; }
114 var url = parent.config.domains[i].url;
115 obj.app.get(url, performRedirection); // Root redirection
116 - obj.app.get(url + 'player.htm', performRedirection); // Player redirection
116
117 // Setup any .well-known folders
118 var p = obj.parent.path.join(obj.parent.datapath, '.well-known' + ((parent.config.domains[i].id == '') ? '' : ('-' + parent.config.domains[i].id)));
119 if (obj.parent.fs.existsSync(p)) { obj.app.use(url + '.well-known', obj.express.static(p)); }
120
121 // Setup all of the redirections to HTTPS
123 - const redirections = ['terms', 'logout', 'MeshServerRootCert.cer', 'mescript.ashx', 'checkmail', 'agentinvite', 'messenger', 'meshosxagent', 'devicepowerevents.ashx', 'downloadfile.ashx', 'userfiles/*', 'webrelay.ashx', 'health.ashx', 'logo.png', 'welcome.jpg'];
122 + const redirections = ['player.htm', 'terms', 'logout', 'MeshServerRootCert.cer', 'mescript.ashx', 'checkmail', 'agentinvite', 'messenger', 'meshosxagent', 'devicepowerevents.ashx', 'downloadfile.ashx', 'userfiles/*', 'webrelay.ashx', 'health.ashx', 'logo.png', 'welcome.jpg'];
123 for (i in redirections) { obj.app.get(url + redirections[i], performRedirection); }
124 }
125