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 committed by backportbot[bot]
parent 6416dba1ce
commit dfd0b9ddf7

View file

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