Project

General

Profile

Patch #30757 » auth_source_ldap.rb.diff

Guilherme Chehab, 2019-02-06 16:01

View differences:

app/models/auth_source_ldap.rb (working copy)
if attrs && attrs[:dn] && authenticate_dn(attrs[:dn], password)
logger.debug "Authentication successful for '#{login}'" if logger && logger.debug?
return attrs.except(:dn)
else
if self.attr_login.downcase == "samaccountname"
domain = (self.base_dn.gsub(/dc[ |=|\"]*|[\"| ]*/i,'')).gsub(',','.')
authenticate_dn(login+"@"+domain,password)
end
end
end
rescue *NETWORK_EXCEPTIONS => e
(1-1/2)