Skip to content

Commit

Permalink
Merge pull request #4864 from Jimmi08/patch-2
Browse files Browse the repository at this point in the history
Fixes #4860 and correct fix for #3983 - correct second authorization
  • Loading branch information
CaMer0n authored Sep 29, 2022
2 parents 0cf5768 + 782c416 commit 6af11ec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions e107_handlers/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ public function login($username, $userpass, $autologin, $response = '', $noredir
$authMethod[0] = varset($pref['auth_method'], 'e107'); // Primary authentication method
$authMethod[1] = varset($pref['auth_method2'], 'none'); // Secondary authentication method (if defined)
$result = false;
foreach ($authMethod as $method)
foreach ($authMethod as $key => $method)
{
if ($method == 'e107' OR $method == 'e107db')
if ($method == 'e107')
{
if ($this->lookupUser($username, $forceLogin))
{
Expand Down Expand Up @@ -161,6 +161,9 @@ public function login($username, $userpass, $autologin, $response = '', $noredir
$authorized = true;
break;
case LOGIN_TRY_OTHER:
if ($key === array_key_last($authMethod)) {
return $this->invalidLogin($username,LOGIN_ABORT);
}
continue 2;
break;
}
Expand Down

0 comments on commit 6af11ec

Please sign in to comment.