From: Lukas Reschke Date: Mon, 6 Sep 2021 08:30:27 +0000 (+0000) Subject: Remove 2FA exemption from PublicPage annotation X-Git-Tag: v21.0.5rc1~39^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b2e4f34e2f7b49b5137462580315b5173c6a6afb;p=nextcloud-server.git Remove 2FA exemption from PublicPage annotation Signed-off-by: Lukas Reschke --- diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php index c934efbb930..d5a8a2f877a 100644 --- a/core/Middleware/TwoFactorMiddleware.php +++ b/core/Middleware/TwoFactorMiddleware.php @@ -83,11 +83,6 @@ class TwoFactorMiddleware extends Middleware { * @param string $methodName */ public function beforeController($controller, $methodName) { - if ($this->reflector->hasAnnotation('PublicPage')) { - // Don't block public pages - return; - } - if ($controller instanceof TwoFactorChallengeController && $this->userSession->getUser() !== null && !$this->reflector->hasAnnotation('TwoFactorSetUpDoneRequired')) {