diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-12-10 11:35:36 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-12-10 11:35:36 +0100 |
commit | 74b1bf1d1cdce55bf7a33acc66b132250c9755fa (patch) | |
tree | 3a92e8653bdd9732ae73ff7d0048ae50af746f87 /core/Middleware | |
parent | d851e5878270e113ba6fb37f25539c60d8b3cc30 (diff) | |
download | nextcloud-server-74b1bf1d1cdce55bf7a33acc66b132250c9755fa.tar.gz nextcloud-server-74b1bf1d1cdce55bf7a33acc66b132250c9755fa.zip |
Fix setting up 2FA when no providers are set up but backup codes
2FA set up is allowed when only backup codes are set up but no other
provider and no provider is failing.
This patch syncs up the login controller check with the challenge
controller check 10 lines above.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/Middleware')
-rw-r--r-- | core/Middleware/TwoFactorMiddleware.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php index 4c13a99a1aa..47b09536acd 100644 --- a/core/Middleware/TwoFactorMiddleware.php +++ b/core/Middleware/TwoFactorMiddleware.php @@ -109,7 +109,7 @@ class TwoFactorMiddleware extends Middleware { && $this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) { $providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser()); - if ($providers->getProviders() === [] && !$providers->isProviderMissing()) { + if ($providers->getPrimaryProviders() === [] && !$providers->isProviderMissing()) { return; } } |