aboutsummaryrefslogtreecommitdiffstats
path: root/core/Middleware/TwoFactorMiddleware.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Middleware/TwoFactorMiddleware.php')
-rw-r--r--core/Middleware/TwoFactorMiddleware.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php
index aa82897ad46..0bad8a2c40f 100644
--- a/core/Middleware/TwoFactorMiddleware.php
+++ b/core/Middleware/TwoFactorMiddleware.php
@@ -82,6 +82,11 @@ class TwoFactorMiddleware extends Middleware {
return;
}
+ if ($controller instanceof \OC\Core\Controller\LoginController && $methodName === 'logout') {
+ // Don't block the logout page, to allow canceling the 2FA
+ return;
+ }
+
if ($this->userSession->isLoggedIn()) {
$user = $this->userSession->getUser();