Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>
  • Loading branch information
ChristophWurst authored and backportbot[bot] committed Dec 13, 2021
commit 22ebbba8e663fd549939cf050b515178348e9823
2 changes: 1 addition & 1 deletion core/Middleware/TwoFactorMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function beforeController($controller, $methodName) {
&& $this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) {
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser());

if ($providers->getProviders() === [] && !$providers->isProviderMissing()) {
if ($providers->getPrimaryProviders() === [] && !$providers->isProviderMissing()) {
return;
}
}
Expand Down