Maks3w / FR3DLdapBundle

This bundle integrates LDAP Authentication with any user manager (Ex: FOSUserBundle)
119 stars 77 forks source link

accountCanonicalForm does not appear to be appending correctly #140

Closed stuart-bradley closed 7 years ago

stuart-bradley commented 7 years ago

My LDAP usernames have the form ab\user.name, so my config is as follows:

fr3d_ldap:
   driver:
      host: '0.0.0.0'
      port: '636'
      useSsl: true
      username: 'cn=Admin,ou=group, dc=ab,dc=com'
      password: '*****'
      bindRequiresDn: false
      baseDn: 'ou=group, dc=ab,dc=com​'
      accountCanonicalForm: 3
      accountDomainNameShort: 'ab'
   user:
      baseDn: 'ou=group, dc=ab,dc=com'
      attributes:
         - { ldap_attr: uid,  user_method: setUsername }

Which I believe is the correct method for prepending the ab\.

However, my dev_log shows the following:

[2017-03-29 22:40:41] ldap_driver.DEBUG: ldap_search(ou=group, dc=ab,dc=com, (&(uid=user.name)), [array]) {"action":"ldap_search","base_dn":"ou=group, dc=ab,dc=com​","filter":"(&(uid=user.name))","attributes":[]} []

Which shows the filter with the incorrect username form. Any idea what's happening?

Maks3w commented 7 years ago

Please if you have a question about "How to xxxxx" ask on a Q&A site like stackoverflow.