Skip to content

Commit

Permalink
fixes an undefined index when getAccessList returns an empty array
Browse files Browse the repository at this point in the history
- [] is a valid return value that should be honored as having no access

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz authored and backportbot[bot] committed Oct 23, 2021
1 parent d7f9017 commit 916b2e7
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 916b2e7

Please sign in to comment.