Skip to content

Commit 8241819

Browse files
committed
fix: mask out rule permissions before merging permissions
Signed-off-by: Robin Appelman <[email protected]>
1 parent e08c289 commit 8241819

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ACL/Rule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public static function mergeRules(array $rules): Rule {
145145
}, 0);
146146
// or'ing the permissions combines them with allow overwriting deny
147147
$permissions = array_reduce($rules, function (int $permissions, Rule $rule) {
148-
return $permissions | $rule->getPermissions();
148+
return $permissions | ($rule->getPermissions() & $rule->getMask());
149149
}, 0);
150150

151151
return new Rule(

0 commit comments

Comments
 (0)