[Koha-bugs] [Bug 6979] LDAP authentication fails during password comparison

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 13 01:10:37 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6979

Manuel Flores <manuel.flores.villatoro at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manuel.flores.villatoro at gma
                   |                            |il.com

--- Comment #15 from Manuel Flores <manuel.flores.villatoro at gmail.com> ---
We had the same problem authenticating LDAP with KOHA 3.22 in Debian Jessie, we
ran some tests and found that the file /usr/share/koha/lib/C4/Auth_with_ldap.pm
 in  the line:

my $cmpmesg = $db->compare( $userldapentry, attr=>'userpassword', value =>
$password );

Wasn't encoding the password to md5_base64 (which use LDAP), so we changed the
line to:


my $cmpmesg = $db->compare( $userldapentry, attr=>'userPassword', value =>
"{MD5}".md5_base64($password)."==" );

Retrieve userPassword attribute, encode the clear text password to md5_base64
and add '{MD5}' at start and '==' end of the password.

If LDAP is using different encryption, that change should be made in the code.
Hope it helps someone.

Greetings.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list