]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove 2FA exemption from PublicPage annotation
authorLukas Reschke <lukas@statuscode.ch>
Mon, 6 Sep 2021 08:30:27 +0000 (08:30 +0000)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 7 Sep 2021 08:49:49 +0000 (08:49 +0000)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
core/Middleware/TwoFactorMiddleware.php

index c934efbb930e2673f3bb7cbf9326daac5f2fabd6..d5a8a2f877a0581deedddcbaa44457da4a078779 100644 (file)
@@ -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')) {