mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-12 05:58:26 +00:00
Merge pull request #111 from draios/update-nodejs-example
Don't run the spawned program in a shell.
This commit is contained in:
commit
03e6c1b3d9
@ -14,8 +14,8 @@ router.get('/', function(req, res) {
|
||||
});
|
||||
|
||||
router.get('/exec/:cmd', function(req, res) {
|
||||
var output = child_process.execSync(req.params.cmd);
|
||||
res.send(output);
|
||||
var ret = child_process.spawnSync(req.params.cmd);
|
||||
res.send(ret.stdout);
|
||||
});
|
||||
|
||||
app.use('/api', router);
|
||||
|
Loading…
Reference in New Issue
Block a user