Merge branch '1.0' into 2.0

This commit is contained in:
terrafrost 2021-08-24 20:22:54 -05:00
commit f02f0005b4

View File

@ -659,6 +659,16 @@ class SFTP extends SSH2
$this->canonicalize_paths = true;
}
/**
* Enable path canonicalization
*
* @access public
*/
function disablePathCanonicalization()
{
$this->canonicalize_paths = false;
}
/**
* Enable arbitrary length packets
*
@ -670,13 +680,13 @@ class SFTP extends SSH2
}
/**
* Enable path canonicalization
* Disable arbitrary length packets
*
* @access public
*/
function disablePathCanonicalization()
function disableArbitraryLengthPackets()
{
$this->canonicalize_paths = false;
$this->allow_arbitrary_length_packets = false;
}
/**
@ -3151,7 +3161,7 @@ class SFTP extends SSH2
// 256 * 1024 is what SFTP_MAX_MSG_LENGTH is set to in OpenSSH's sftp-common.h
if (!$this->allow_arbitrary_length_packets &&!$this->use_request_id && $tempLength > 256 * 1024) {
if (!$this->allow_arbitrary_length_packets && !$this->use_request_id && $tempLength > 256 * 1024) {
user_error('Invalid SFTP packet size');
return false;
}