aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-26 14:35:25 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-09-26 14:22:37 +0000
commitdfd0b9ddf78df4fa4db50c1716a757b580de5204 (patch)
treedd55aed7a87674f78891f4363fc93283d9e820f0
parent6416dba1cea738629edc6defe5fd8387d220de7a (diff)
downloadnextcloud-server-backport/48366/stable29.tar.gz
nextcloud-server-backport/48366/stable29.zip
fix(files_sharing): Check if propfind response is valid before accessing share permission propsbackport/48366/stable29
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r--apps/files_sharing/lib/External/Storage.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php
index 73ece10a414..b13f1860eb8 100644
--- a/apps/files_sharing/lib/External/Storage.php
+++ b/apps/files_sharing/lib/External/Storage.php
@@ -384,6 +384,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;