1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Minor security fixes.

This commit is contained in:
Ylian Saint-Hilaire 2019-01-04 17:59:13 -08:00
parent 66b9e3ddb8
commit c880007cf2
26 changed files with 1290 additions and 1177 deletions

View file

@ -1226,6 +1226,9 @@ function kvmCtrlData(channel, cmd) {
}
break;
}
default:
// Unknown action, ignore it.
break;
}
}
@ -1293,6 +1296,9 @@ function processLmsControlData(data) {
{ amtMei.closeUserInitiatedConnection(function (status, socket) { var data = Buffer.alloc(6); data.writeUInt16LE(7, 0); data.writeUInt32LE(status, 2); socket.write(data); }, this); break; }
case 8: // Get Intel AMT CIRA State (CMD = 8)
{ amtMei.getRemoteAccessConnectionStatus(function (state, socket) { var data = Buffer.alloc(6); data.writeUInt16LE(8, 0); data.writeUInt32LE(state.status, 2); socket.write(Buffer.concat([data, state.raw])); }, this); break; }
default:
// Unknown action, ignore it.
break;
}
}

File diff suppressed because one or more lines are too long

View file

@ -462,6 +462,9 @@ function createMeshCore(agent) {
if (data.url) { mesh.SendCommand({ "action": "msg", "type":"openUrl", "url": data.url, "sessionid": data.sessionid, "success": (openUserDesktopUrl(data.url) != null) }); }
break;
}
default:
// Unknown action, ignore it.
break;
}
break;
}
@ -499,6 +502,9 @@ function createMeshCore(agent) {
if (data.url) { mesh.SendCommand({ "action": "openUrl", "url": data.url, "sessionid": data.sessionid, "success": (openUserDesktopUrl(data.url) != null) }); }
break;
}
default:
// Unknown action, ignore it.
break;
}
}
}
@ -888,6 +894,9 @@ function createMeshCore(agent) {
}
break;
}
default:
// Unknown action, ignore it.
break;
}
}
//sendConsoleText("Got tunnel #" + this.httprequest.index + " data: " + data, this.httprequest.sessionid);
@ -927,6 +936,9 @@ function createMeshCore(agent) {
} catch (e) { }
break;
}
default:
// Unknown action, ignore it.
break;
}
return;
}
@ -1045,6 +1057,9 @@ function createMeshCore(agent) {
case 'darwin':
child = require('child_process').execFile('/usr/bin/open', ['open', url], { uid: require('user-sessions').consoleUid() });
break;
default:
// Unknown platform, ignore this command.
break;
}
} catch (ex) { }
return child;
@ -1605,6 +1620,7 @@ function createMeshCore(agent) {
switch (amtMessage) {
case 'iAMT0050': { if (amtMessageArg == '48') { notify = 'Intel® AMT Serial-over-LAN connected'; } else if (amtMessageArg == '49') { notify = 'Intel® AMT Serial-over-LAN disconnected'; } break; } // SOL
case 'iAMT0052': { if (amtMessageArg == '1') { notify = 'Intel® AMT KVM connected'; } else if (amtMessageArg == '2') { notify = 'Intel® AMT KVM disconnected'; } break; } // KVM
default: { break; }
}
// Send to the entire mesh, no sessionid or userid specified.
@ -1898,6 +1914,11 @@ function createMeshCore(agent) {
}
break;
}
default: {
console.log('Invalid KVM command', cmd);
sendConsoleText('Invalid KVM command: ' + cmd);
break;
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -301,6 +301,9 @@ function serviceHost(serviceName)
}
process.exit();
break;
default:
// Unknown arguments, skip it.
break;
}
}

View file

@ -46,6 +46,9 @@ function parseServiceStatus(token)
case 0x00000001:
j.state = 'STOPPED';
break;
default:
// Unknown service state
break;
}
var controlsAccepted = token.Deref((2 * 4), 4).toBuffer().readUInt32LE();
j.controlsAccepted = [];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -46,6 +46,9 @@ function parseServiceStatus(token)
case 0x00000001:
j.state = 'STOPPED';
break;
default:
// Unknown service status.
break;
}
var controlsAccepted = token.Deref((2 * 4), 4).toBuffer().readUInt32LE();
j.controlsAccepted = [];
@ -316,7 +319,7 @@ function serviceManager()
this._update.stdin.write('exit\n');
break;
default: // unknown platform service type
default: // Unknown platform service type
break;
}
}
@ -449,7 +452,7 @@ function serviceManager()
this._update.stdin.write('systemctl disable ' + name + '.service\n');
this._update.stdin.write('exit\n');
break;
default: // unknown platform service type
default: // Unknown platform service type
break;
}
}

File diff suppressed because one or more lines are too long