aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
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:23:55 +0000
commit35d2da42ec9dfcb292fb7358092304c6e77fdf17 (patch)
treee699fc5ad197aefbc304119fdce532cea29215b4 /apps/files_sharing
parent93b634f49795b32b6df8a59bbbf5297ec3e26d05 (diff)
downloadnextcloud-server-35d2da42ec9dfcb292fb7358092304c6e77fdf17.tar.gz
nextcloud-server-35d2da42ec9dfcb292fb7358092304c6e77fdf17.zip
fix(files_sharing): Check if propfind response is valid before accessing share permission propsbackport/48366/stable30
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/files_sharing')
-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 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;