Remove 2FA exemption from PublicPage annotation

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2021-09-06 08:30:27 +00:00 committed by GitHub
parent 33a0b75c83
commit 7c1038bfb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,11 +82,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')) {