mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-14 17:46:28 +00:00
SFTP: try without path canonicalization if initial realpath() fails
on re-examining the "fix" for #1796 it would appear that commit f189b9a is insufficient.
This commit is contained in:
parent
3b0fb1c05f
commit
28211e5a49
@ -813,7 +813,8 @@ class Net_SFTP extends Net_SSH2
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->canonicalize_paths = false;
|
$this->canonicalize_paths = false;
|
||||||
$this->_reset_connection(NET_SSH2_DISCONNECT_CONNECTION_LOST);
|
$this->_reset_sftp();
|
||||||
|
return $this->_init_sftp_connection();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_update_stat_cache($this->pwd, array());
|
$this->_update_stat_cache($this->pwd, array());
|
||||||
@ -3683,6 +3684,19 @@ class Net_SFTP extends Net_SSH2
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the SFTP channel for re-use
|
||||||
|
*
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
function _reset_sftp()
|
||||||
|
{
|
||||||
|
$this->use_request_id = false;
|
||||||
|
$this->pwd = false;
|
||||||
|
$this->requestBuffer = [];
|
||||||
|
$this->partial_init = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets a connection for re-use
|
* Resets a connection for re-use
|
||||||
*
|
*
|
||||||
@ -3692,10 +3706,7 @@ class Net_SFTP extends Net_SSH2
|
|||||||
function _reset_connection($reason)
|
function _reset_connection($reason)
|
||||||
{
|
{
|
||||||
parent::_reset_connection($reason);
|
parent::_reset_connection($reason);
|
||||||
$this->use_request_id = false;
|
$this->_reset_sftp();
|
||||||
$this->pwd = false;
|
|
||||||
$this->requestBuffer = array();
|
|
||||||
$this->partial_init = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user