mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
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>
This commit is contained in:
parent
a31ee8d9f3
commit
e4011bc3aa
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue