Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-07-30 19:29:23 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-07-30 19:29:23 +0300
commit2fca843cc01b111708046ebfa9ff9a2d55c6f4c6 (patch)
tree1f6a70c486328f6e3871f1e1b60865f4054f6bd2 /core/Middleware
parent904a762de7b1352485ee9e0260875d8b7615d189 (diff)
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>
Diffstat (limited to 'core/Middleware')
-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();
}
}