-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
Hello,
while it worked under Joomla 3 with the same configuration, the authentication with "Active directory" does not work anymore under Joomla 4.0.3
Steps to reproduce the issue
Expected result
that it works as before.
Actual result
error message : ldapfailure The login does not match the password, or you do not have an account yet.
System information (as much as possible)
Joomla 4.0.3
Additional comments
I did some debugging and found that the users_dn field is not used for "direct binds" when it should be.
To make this work, I modified the joomla/plugins/authentication/ldap/ldap.php file as follows:
//$ldap->bind($ldap->escape($credentials['username'], '', LDAP_ESCAPE_DN), $credentials['password']);
$dn = str_replace('[username]', $credentials['username'], $this->params->get('users_dn', ''));
$ldap->bind($dn, $credentials['password']);
