diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index 389265eb..64e372d3 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -170,7 +170,7 @@ class Net_SCP return false; } - if (!$this->ssh->exec('scp -t "' . $remote_file . '"', false)) { // -t = to + if (!$this->ssh->exec('scp -t ' . escapeshellarg($remote_file), false)) { // -t = to return false; } @@ -244,7 +244,7 @@ class Net_SCP return false; } - if (!$this->ssh->exec('scp -f "' . $remote_file . '"', false)) { // -f = from + if (!$this->ssh->exec('scp -f ' . escapeshellarg($remote_file), false)) { // -f = from return false; }