diff options
author | provokateurin <kate@provokateurin.de> | 2024-09-26 14:35:25 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-09-26 14:35:31 +0200 |
commit | 13d1cb730f1fd29361f79868c2f6c7bce385c4fc (patch) | |
tree | 0b96526a3ae60329f28fb61a7fa11b7321cac36c | |
parent | 5d4a358cc44aa31ba98d0861c4d79914df53c2f5 (diff) | |
download | nextcloud-server-13d1cb730f1fd29361f79868c2f6c7bce385c4fc.tar.gz nextcloud-server-13d1cb730f1fd29361f79868c2f6c7bce385c4fc.zip |
fix(files_sharing): Check if propfind response is valid before accessing share permission propsfix/files_sharing/ocm-permissions
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r-- | apps/files_sharing/lib/External/Storage.php | 4 |
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 38b7a29e366..6e5e219ae69 100644 --- a/apps/files_sharing/lib/External/Storage.php +++ b/apps/files_sharing/lib/External/Storage.php @@ -345,6 +345,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; |