Project

General

Profile

Defect #20699 » redmine_auth_source_ldap_531fix.diff

Alexander Ryabinovskiy, 2017-12-13 12:15

View differences:

redmine/app/models/auth_source_ldap.rb Fri Dec 08 12:05:57 2017 +0300 → redmine/app/models/auth_source_ldap.rb Fri Dec 08 12:07:19 2017 +0300
# Check if a DN (user record) authenticates with the password
def authenticate_dn(dn, password)
if dn.present? && password.present?
initialize_ldap_con(dn, password).bind
ldap_con = nil
ldap_con = initialize_ldap_con(dn, password)
authenticated = ldap_con.bind
if authenticated == false
authenticated = ldap_con.get_operation_result.error_message.include? "80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 531, v2580\u0000"
end
authenticated
end
end
    (1-1/1)