mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 04:42:54 -05:00
prevent runcommand with --reply from terminating other ws connections (#6797)
This commit is contained in:
@@ -1579,7 +1579,7 @@ function handleServerCommand(data) {
|
||||
mesh.cmdchild = require('child_process').execFile('/bin/sh', ['sh'], options);
|
||||
mesh.cmdchild.descriptorMetadata = 'UserCommandsShell';
|
||||
mesh.cmdchild.stdout.on('data', function (c) { replydata += c.toString(); });
|
||||
mesh.cmdchild.stderr.on('data', function (c) { replydata + c.toString(); });
|
||||
mesh.cmdchild.stderr.on('data', function (c) { replydata += c.toString(); });
|
||||
mesh.cmdchild.stdin.write(data.cmds.split('\r').join('') + '\nexit\n');
|
||||
mesh.cmdchild.on('exit', function () {
|
||||
if (data.reply) {
|
||||
|
||||
Reference in New Issue
Block a user