Browse Source

[Nostromo] Escape pipe on remote commands

pull/1/head
Andrés Montañez 8 years ago
parent
commit
3b087b05b0
  1. 2
      src/Mage/Runtime/Runtime.php

2
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);

Loading…
Cancel
Save