1933: Getting new user details from LDAP are not using binded user account

daC****@gmai***** (Google Code) (Is this you? Claim this profile.)
Nov. 16, 2013
What version are you running?
1.5.1

What's the URL of the page containing the problem?
N/A

What steps will reproduce the problem?
1. Setup LDAP directory in a way that only uid and dn fields are primarily visible for anonymous users. Eg. other user details are hidden until user is authenticated.
2. Setup LDAP backend to authenticate against LDAP directory and look for uid=<login>. Do not use special account for initial bind.
3. Login with new user not previously on the system
4. New user does not have givenName nor sn set.

What is the expected output? What do you see instead?
givenName and sn set for new user.

What operating system are you using? What browser?
Linux; but not relevant to this issue.

Please provide any additional information below.

One fix for the issue would be to provide ldapo object from LDAPBackend::authenticate -> LDAPBackend::get_or_create_user. And as user was previously binded in authenticate then ldapo.search_s would provide needed details in get_or_create_user.

Another thing is that ldapo.search_s after binding might be also useful to allow updates from LDAP to local user database. Thou it might be a good idea to make this configurable.
david
#1 david
  • +Component-Accounts
david
#2 david
This has since been fixed.
  • +Fixed