mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
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:
parent
5d4a358cc4
commit
13d1cb730f
1 changed files with 4 additions and 0 deletions
4
apps/files_sharing/lib/External/Storage.php
vendored
4
apps/files_sharing/lib/External/Storage.php
vendored
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue