mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
SFTP: make NO_REALPATH apply to get() as well
This commit is contained in:
parent
5979ed571f
commit
1564a27f6e
@ -2163,10 +2163,12 @@ class Net_SFTP extends Net_SSH2
|
||||
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);
|
||||
if (!$this->_send_sftp_packet(NET_SFTP_OPEN, $packet)) {
|
||||
|
Loading…
Reference in New Issue
Block a user