diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-03-11 10:54:52 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-03-11 10:54:52 +0100 |
commit | e81eaf45d25268b947fa998f3cd2219258c750aa (patch) | |
tree | fec44690025698d6cfbdedf1636fba548827a810 /apps | |
parent | 23e8ae15aaea30359a927492155de13c97b311ce (diff) | |
download | nextcloud-server-e81eaf45d25268b947fa998f3cd2219258c750aa.tar.gz nextcloud-server-e81eaf45d25268b947fa998f3cd2219258c750aa.zip |
Prevent reading key on SFTP stat bool
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index ae049007cdc..e46f60d0be4 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -327,6 +327,9 @@ class SFTP extends \OC\Files\Storage\Common { public function filetype($path) { try { $stat = $this->getConnection()->stat($this->absPath($path)); + if (!is_array($stat) || !array_key_exists('type', $stat)) { + return false; + } if ((int) $stat['type'] === NET_SFTP_TYPE_REGULAR) { return 'file'; } |