summaryrefslogtreecommitdiffstats
path: root/core/Middleware/TwoFactorMiddleware.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2016-06-09 18:45:12 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-06-09 18:45:12 +0200
commita636e4ff28b25797d6cc7750bc1efe52437ec67f (patch)
treeef385b9ef924088b6d6c1404d659e6be450aaf1f /core/Middleware/TwoFactorMiddleware.php
parent28193732ea24094335cccddf5fe03aeeeb6f5894 (diff)
parent6ba18934e6f095de08bec7bdc10c45485eeb5cc7 (diff)
downloadnextcloud-server-a636e4ff28b25797d6cc7750bc1efe52437ec67f.tar.gz
nextcloud-server-a636e4ff28b25797d6cc7750bc1efe52437ec67f.zip
Downstream 2016-06-09
Merge branch 'master' of https://github.com/owncloud/core into downstream-160609
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();