From 35d2da42ec9dfcb292fb7358092304c6e77fdf17 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 26 Sep 2024 14:35:25 +0200 Subject: fix(files_sharing): Check if propfind response is valid before accessing share permission props Signed-off-by: provokateurin --- apps/files_sharing/lib/External/Storage.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/files_sharing/lib/External/Storage.php') diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php index a85e32f7619..2a53bffb87e 100644 --- a/apps/files_sharing/lib/External/Storage.php +++ b/apps/files_sharing/lib/External/Storage.php @@ -357,6 +357,10 @@ class Storage extends DAV implements ISharedStorage, IDisableEncryptionStorage, public function getPermissions($path): int { $response = $this->propfind($path); + if ($response === false) { + return 0; + } + $ocsPermissions = $response['{http://open-collaboration-services.org/ns}share-permissions'] ?? null; $ocmPermissions = $response['{http://open-cloud-mesh.org/ns}share-permissions'] ?? null; $ocPermissions = $response['{http://owncloud.org/ns}permissions'] ?? null; -- cgit v1.2.3