Changed from manual escaping to escapeshellarg in SshConnector

feature/node-rewrite
Sven Slootweg 12 years ago
parent e7c64170a5
commit 5d7188d46e

@ -101,8 +101,8 @@ class SshConnector extends CPHPBaseClass
private function DoCommand($command, $throw_exception)
{
$command = str_replace("'", "\'", $command);
$command = "{$this->helper} '{$command}'";
$command = escapeshellarg($command);
$command = "{$this->helper} {$command}";
$stream = ssh2_exec($this->connection, $command);
stream_set_blocking($stream, true);

Loading…
Cancel
Save