Browse Source

Merge pull request #14314 from nextcloud/enh/save_query

No need to check 2fa state on apptoken logins
tags/v16.0.0alpha1
Morris Jobke 5 years ago
parent
commit
ea6ba53cc0
No account linked to committer's email address
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      core/Middleware/TwoFactorMiddleware.php

+ 2
- 1
core/Middleware/TwoFactorMiddleware.php View File

@@ -95,7 +95,8 @@ class TwoFactorMiddleware extends Middleware {
if ($this->userSession->isLoggedIn()) {
$user = $this->userSession->getUser();

if ($this->twoFactorManager->isTwoFactorAuthenticated($user)) {

if ($this->session->exists('app_password') || $this->twoFactorManager->isTwoFactorAuthenticated($user)) {
$this->checkTwoFactor($controller, $methodName, $user);
} else if ($controller instanceof TwoFactorChallengeController) {
// Allow access to the two-factor controllers only if two-factor authentication

Loading…
Cancel
Save