fix(files_sharing): Check if propfind response is valid before accessing share permission props

Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
provokateurin 2024-09-26 14:35:25 +02:00
parent 5d4a358cc4
commit 13d1cb730f
No known key found for this signature in database

View file

@ -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;