[Nostromo] Escape pipe on remote commands

This commit is contained in:
Andrés Montañez 2017-01-08 05:32:56 -03:00
parent 6e130b0285
commit 3b087b05b0

View file

@ -426,7 +426,7 @@ class Runtime
}
}
$cmdRemote = str_replace(['"', '&', ';'], ['\"', '\&', '\;'], $cmdDelegate);
$cmdRemote = str_replace(['"', '&', ';', '|'], ['\"', '\&', '\;', '\|'], $cmdDelegate);
$cmdLocal = sprintf('ssh -p %d %s %s@%s sh -c \"%s\"', $sshConfig['port'], $sshConfig['flags'], $user, $host, $cmdRemote);
return $this->runLocalCommand($cmdLocal, $timeout);