Skip to content

Commit

Permalink
Merge pull request #1579 from matt6697/fix/ldap_sso
Browse files Browse the repository at this point in the history
[Fix] LDAP+SSO authentication (AUTH_TYPE = 4)
  • Loading branch information
Lea9250 authored Dec 18, 2023
2 parents cca1d85 + 6177e28 commit 616ea3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion backend/AUTH/methode/ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ function verif_pw_ldap($login, $pw) {
// login doesn't exist
return ("BAD LOGIN OR PASSWORD");
}
return (ldap_test_pw($info[0]["dn"], $pw) ? "OK" : "BAD LOGIN OR PASSWORD");

$affich_method = get_affiche_methode();
if($affich_method == 'SSO') {
return (isset($info[0]["dn"]) ? "OK" : "BAD LOGIN OR PASSWORD");
} else {
return (ldap_test_pw($info[0]["dn"], $pw) ? "OK" : "BAD LOGIN OR PASSWORD");
}
}

function search_on_loginnt($login) {
Expand Down
5 changes: 4 additions & 1 deletion backend/require/auth.manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ function get_list_methode($identity = false){
);

case 4:

return array(
0 => "ldap.php"
);
break;
case 5:
if($identity){
return array(
Expand Down

0 comments on commit 616ea3e

Please sign in to comment.