mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-17 02:35:10 +00:00
SCP: always encapsulate filenames within double quotes
This commit is contained in:
parent
9edf905939
commit
aec33901fc
@ -170,9 +170,7 @@ class Net_SCP
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$filename = strpos($remote_file, ' ') !== false ? '"' . $remote_file . '"' : $remote_file;
|
if (!$this->ssh->exec('scp -t "' . $remote_file . '"', false)) { // -t = to
|
||||||
|
|
||||||
if (!$this->ssh->exec('scp -t ' . $filename, false)) { // -t = to
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,9 +245,7 @@ class Net_SCP
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$filename = strpos($remote_file, ' ') !== false ? '"' . $remote_file . '"' : $remote_file;
|
if (!$this->ssh->exec('scp -f "' . $remote_file . '"', false)) { // -f = from
|
||||||
|
|
||||||
if (!$this->ssh->exec('scp -f ' . $filename, false)) { // -f = from
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user