mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 21:17:53 +00:00
SFTP: make NO_REALPATH apply to get() as well
This commit is contained in:
parent
5979ed571f
commit
1564a27f6e
@ -2163,9 +2163,11 @@ class Net_SFTP extends Net_SSH2
|
||||
return false;
|
||||
}
|
||||
|
||||
$remote_file = $this->_realpath($remote_file);
|
||||
if ($remote_file === false) {
|
||||
return false;
|
||||
if (!($mode & NET_SFTP_NO_REALPATH)) {
|
||||
$remote_file = $this->_realpath($remote_file);
|
||||
if ($remote_file === false) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$packet = pack('Na*N2', strlen($remote_file), $remote_file, NET_SFTP_OPEN_READ, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user