1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-11-27 12:55:58 +01:00

Merge pull request #527 from DavidAnderson684/patch-2

Quote shell argument with escapeshellarg()

* DavidAnderson684/patch-2:
  Quote shell argument with escapeshellarg()
This commit is contained in:
Andreas Fischer 2014-12-04 20:00:41 +01:00
commit 262da528a0

View File

@ -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;
}