Skip to content

Commit

Permalink
fixup! fix: Apply checks on shares in the middleware
Browse files Browse the repository at this point in the history
Signed-off-by: Max <max@nextcloud.com>
  • Loading branch information
max-nextcloud committed Oct 1, 2024
1 parent 7ff9ac5 commit 768fc16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Middleware/SessionMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private function assertUserOrShareToken(ISessionAwareController $controller): vo
}
}

if (!($share->getPermissions() & Constants::PERMISSION_READ)) {
if ($share->getPermissions() & Constants::PERMISSION_READ !== Constants::PERMISSION_READ) {
throw new InvalidSessionException();
}

Expand Down

0 comments on commit 768fc16

Please sign in to comment.