From 3b087b05b0b86546df50841208c35e3480062d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Monta=C3=B1ez?= Date: Sun, 8 Jan 2017 05:32:56 -0300 Subject: [PATCH] [Nostromo] Escape pipe on remote commands --- src/Mage/Runtime/Runtime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mage/Runtime/Runtime.php b/src/Mage/Runtime/Runtime.php index 8b23209..400b736 100644 --- a/src/Mage/Runtime/Runtime.php +++ b/src/Mage/Runtime/Runtime.php @@ -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);