Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(files_sharing): Check if propfind response is valid before access…
…ing share permission props

Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Sep 26, 2024
commit 13d1cb730f1fd29361f79868c2f6c7bce385c4fc
4 changes: 4 additions & 0 deletions apps/files_sharing/lib/External/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ public function isSharable($path): bool {

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;
Expand Down