Skip to content

Commit

Permalink
Merge pull request #4477 from corentin-soriano/fix_local_account_issue
Browse files Browse the repository at this point in the history
Fix login issue with local accounts.
  • Loading branch information
nilsteampassnet authored Nov 20, 2024
2 parents 3a365f3 + 1a0c022 commit fa2d565
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion sources/identify.php
Original file line number Diff line number Diff line change
Expand Up @@ -2510,7 +2510,19 @@ function createOauth2User(
'message' => $ret['message'],
];
}


// login/password attempt on a local account:
// Return to avoid overwrite of user password that can allow a user
// to steal a local account.
if (!$ret['oauth2Connection'] || !$ret['userPasswordVerified']) {
return [
'error' => false,
'message' => $ret['message'],
'ldapConnection' => false,
'userPasswordVerified' => false,
];
}

// Oauth2 user already exists and authenticated
if (WIP === true) error_log("--- USER AUTHENTICATED ---");
$userInfo['has_been_created'] = 0;
Expand Down

0 comments on commit fa2d565

Please sign in to comment.