Bug #6979
author= <=>
Wed, 5 Oct 2011 20:47:21 +0000 (16:47 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 31 Mar 2017 12:21:28 +0000 (12:21 +0000)
commit8c3fc47338fed6c35ea21a6524d6c1a109861ebf
tree367edccc74c54122acaae5debf1fb591d0ebc6a3
parent767ede853bbc2d899c0b7c39ad884111d4e93902
Bug #6979

I removed several lines of code in the checkpw_ldap subroutine where
LDAP authentication takes place, in the "else" part of the conditional
that checks for the auth_by_bind config parameter. I added several lines
to check whether the user can log in to LDAP using their DN and the
password supplied in the login form. If they are able to bind, login
contiues as normal and the LDAP attributes can be harvested as normal if
the update options are turned on. The routine that was in place was
failing because it was trying to check against a non-existent LDAP entry
attribute called 'userpassword'. Instead of checking against a
'userpassword' attribute, the routine really should be checking to make
sure the user can actually bind to LDAP. That's what I set up, and it is
a safer way to test authentication against LDAP.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Auth_with_ldap.pm