Patch #30757 » auth_source_ldap.rb.diff
| 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
|
||