mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-13 18:02:58 +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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!($mode & NET_SFTP_NO_REALPATH)) {
|
||||||
$remote_file = $this->_realpath($remote_file);
|
$remote_file = $this->_realpath($remote_file);
|
||||||
if ($remote_file === false) {
|
if ($remote_file === false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$packet = pack('Na*N2', strlen($remote_file), $remote_file, NET_SFTP_OPEN_READ, 0);
|
$packet = pack('Na*N2', strlen($remote_file), $remote_file, NET_SFTP_OPEN_READ, 0);
|
||||||
if (!$this->_send_sftp_packet(NET_SFTP_OPEN, $packet)) {
|
if (!$this->_send_sftp_packet(NET_SFTP_OPEN, $packet)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user