From 573f4aaf02bd3faf75bffebfa3cbef1ec56b6f52 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Wed, 4 Dec 2024 13:51:35 -0600 Subject: [PATCH] SFTP: fix possible SFTPv3 error when rcving date only attributes --- phpseclib/Net/SFTP.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 1e61e0bb..47dac48f 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -3043,6 +3043,8 @@ class SFTP extends SSH2 */ protected function parseAttributes(&$response) { + $attr = []; + if ($this->version >= 4) { list($flags, $attr['type']) = Strings::unpackSSH2('NC', $response); } else {