diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index c44f3066..fccff3ce 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -718,6 +718,16 @@ class Net_SFTP extends Net_SSH2 $this->canonicalize_paths = true; } + /** + * Enable path canonicalization + * + * @access public + */ + function disablePathCanonicalization() + { + $this->canonicalize_paths = false; + } + /** * Enable arbitrary length packets * @@ -729,13 +739,13 @@ class Net_SFTP extends Net_SSH2 } /** - * Enable path canonicalization + * Disable arbitrary length packets * * @access public */ - function disablePathCanonicalization() + function disableArbitraryLengthPackets() { - $this->canonicalize_paths = false; + $this->allow_arbitrary_length_packets = false; } /** @@ -3212,7 +3222,7 @@ class Net_SFTP extends Net_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; }