mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
Merge pull request #28086 from nextcloud/backport/28078/stable21
[stable21] Improve provider check
This commit is contained in:
commit
3d1fb04351
1 changed files with 5 additions and 1 deletions
|
|
@ -101,7 +101,11 @@ class TwoFactorMiddleware extends Middleware {
|
|||
if ($controller instanceof ALoginSetupController
|
||||
&& $this->userSession->getUser() !== null
|
||||
&& $this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) {
|
||||
return;
|
||||
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser());
|
||||
|
||||
if ($providers->getProviders() === [] && !$providers->isProviderMissing()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($controller instanceof LoginController && $methodName === 'logout') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue