Skip to content

Commit

Permalink
Fix file drop shared folders
Browse files Browse the repository at this point in the history
When ACL is enabled the READ permission is required to get any other
permission on the group folder (or its contents). However, the
ACLCacheWrapper verified not only that the READ permission was enabled
for the folder/file, but also that it was being requested. Due to this
it was not possible to publicly upload a file to a file drop shared
folder inside a group folder, as in that case only SHARE + CREATE
permissions are requested.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
  • Loading branch information
danxuliu authored and backportbot[bot] committed Feb 25, 2021
1 parent c2f4ae2 commit 76957b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ACL/ACLCacheWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function formatCacheEntry($entry) {
if (isset($entry['permissions'])) {
$entry['scan_permissions'] = $entry['permissions'];
$entry['permissions'] &= $this->getACLPermissionsForPath($entry['path']);
if (!($entry['permissions'] & Constants::PERMISSION_READ)) {
if (!$entry['permissions']) {
return false;
}
}
Expand Down

0 comments on commit 76957b5

Please sign in to comment.