aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-07-30 18:29:23 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-07-30 18:29:23 +0200
commit2fca843cc01b111708046ebfa9ff9a2d55c6f4c6 (patch)
tree1f6a70c486328f6e3871f1e1b60865f4054f6bd2
parent904a762de7b1352485ee9e0260875d8b7615d189 (diff)
downloadnextcloud-server-2fca843cc01b111708046ebfa9ff9a2d55c6f4c6.tar.gz
nextcloud-server-2fca843cc01b111708046ebfa9ff9a2d55c6f4c6.zip
Fix setting up 2FA providers when 2FA is enforced and bc are generated
When a user has backup codes generated and got their 2FA enforced then they should be able to set up TOTP and similar providers during the login. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--core/Middleware/TwoFactorMiddleware.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php
index 330a9258d90..398234fa1e4 100644
--- a/core/Middleware/TwoFactorMiddleware.php
+++ b/core/Middleware/TwoFactorMiddleware.php
@@ -92,7 +92,7 @@ class TwoFactorMiddleware extends Middleware {
&& !$this->reflector->hasAnnotation('TwoFactorSetUpDoneRequired')) {
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser());
- if (!($providers->getProviders() === [] && !$providers->isProviderMissing())) {
+ if (!($providers->getPrimaryProviders() === [] && !$providers->isProviderMissing())) {
throw new TwoFactorAuthRequiredException();
}
}