cschiewek/devise_ldap_authenticatable — Issue #64: Doubly escaping ldap strings
Author: darkskiez
Created: 2011-12-12 14:17:59+00:00
State: open

In our AD database, the user DNs have the format "Surname, Firstname", by the time it makes it through devise_ldap_authenticatable its got an extra \ escape.

eg:

ruby-1.9.3-p0 :001 > Devise::LdapAdapter.get_ldap_entry('jbloggs')['dn']
LDAP: LDAP search for login: sAMAccountName=jbloggs
=> ["CN=Bloggs\\, Joe,OU=Dev,OU=Euro,DC=sample,DC=com"]