From f0c6bffc75a83532f4e48c516cbc300eb572d364 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Mon, 5 Aug 2019 15:13:32 -0700 Subject: [PATCH] Fixed typo, where an exception was thrown when trying to send server log, if user consent was enabled --- agents/meshcore.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index 6b93e891..05975e7a 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1072,7 +1072,7 @@ function createMeshCore(agent) pr.then( function () { // Success - MeshServerLog('Starting remote terminal after local user accepted (' + this.httprequest.remoteaddr + ')', this.httprequest); + MeshServerLog('Starting remote terminal after local user accepted (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest); this.ws.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: null })); if (this.ws.httprequest.consent && (this.ws.httprequest.consent & 2)) { // User Notifications is required @@ -1082,7 +1082,7 @@ function createMeshCore(agent) }, function (e) { // User Consent Denied/Failed - MeshServerLog('Failed to start remote terminal after local user rejected (' + this.httprequest.remoteaddr + ')', this.httprequest); + MeshServerLog('Failed to start remote terminal after local user rejected (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest); this.ws.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: e.toString() })); this.ws.end(); }); @@ -1163,7 +1163,7 @@ function createMeshCore(agent) function () { // Success - MeshServerLog('Starting remote desktop after local user accepted (' + this.httprequest.remoteaddr + ')', this.httprequest); + MeshServerLog('Starting remote desktop after local user accepted (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest); this.ws.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: null })); if (this.ws.httprequest.consent && (this.ws.httprequest.consent & 1)) { // User Notifications is required @@ -1175,7 +1175,7 @@ function createMeshCore(agent) function (e) { // User Consent Denied/Failed - MeshServerLog('Failed to start remote desktop after local user rejected (' + this.httprequest.remoteaddr + ')', this.httprequest); + MeshServerLog('Failed to start remote desktop after local user rejected (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest); this.ws.end(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: e.toString() })); }); } @@ -1220,7 +1220,7 @@ function createMeshCore(agent) pr.then( function () { // Success - MeshServerLog('Starting remote files after local user accepted (' + this.httprequest.remoteaddr + ')', this.httprequest); + MeshServerLog('Starting remote files after local user accepted (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest); this.ws.write(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: null })); if (this.ws.httprequest.consent && (this.ws.httprequest.consent & 4)) { // User Notifications is required @@ -1230,7 +1230,7 @@ function createMeshCore(agent) }, function (e) { // User Consent Denied/Failed - MeshServerLog('Failed to start remote files after local user rejected (' + this.httprequest.remoteaddr + ')', this.httprequest); + MeshServerLog('Failed to start remote files after local user rejected (' + this.ws.httprequest.remoteaddr + ')', this.ws.httprequest); this.ws.end(JSON.stringify({ ctrlChannel: '102938', type: 'console', msg: e.toString() })); }); } else {