mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-19 22:15:05 +02:00
[Nostromo] Escape pipe on remote commands
This commit is contained in:
parent
6e130b0285
commit
3b087b05b0
|
@ -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);
|
$cmdLocal = sprintf('ssh -p %d %s %s@%s sh -c \"%s\"', $sshConfig['port'], $sshConfig['flags'], $user, $host, $cmdRemote);
|
||||||
|
|
||||||
return $this->runLocalCommand($cmdLocal, $timeout);
|
return $this->runLocalCommand($cmdLocal, $timeout);
|
||||||
|
|
Loading…
Reference in a new issue