From 768fc1651611b20eeadf66c8d9add2281340739d Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 1 Oct 2024 18:42:40 +0200 Subject: [PATCH] fixup! fix: Apply checks on shares in the middleware Signed-off-by: Max --- lib/Middleware/SessionMiddleware.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Middleware/SessionMiddleware.php b/lib/Middleware/SessionMiddleware.php index e7d18819fcf..ae95b7839c2 100644 --- a/lib/Middleware/SessionMiddleware.php +++ b/lib/Middleware/SessionMiddleware.php @@ -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(); }