Skip to content
Merged
Changes from all commits
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
fixes an undefined index when getAccessList returns an empty array
- [] is a valid return value that should be honored as having no access

Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz authored and backportbot[bot] committed Oct 23, 2021
commit 916b2e71646c408d0041e46b248385075a7a3e4e
2 changes: 1 addition & 1 deletion apps/workflowengine/lib/Entity/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function isLegitimatedForUserId(string $uid): bool {
return true;
}
$acl = $this->shareManager->getAccessList($node, true, true);
return array_key_exists($uid, $acl['users']);
return isset($acl['users']) && array_key_exists($uid, $acl['users']);
} catch (NotFoundException $e) {
return false;
}
Expand Down