- Bug: enumerateUsers returned undesired results if an exact match

was required since LDAP searches are not case sensitive.
  (https://bugs.launchpad.net/bugs/585901)


git-svn-id: http://svn.dataflake.org/svn/Products.LDAPMultiPlugins/trunk@1955 835909ba-7c00-0410-bfa4-884f43845301
This commit is contained in:
jens 2010-05-26 15:44:49 +00:00
parent 59bb974bcc
commit 87ac562b85
2 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,8 @@ To see earlier changes please see HISTORY.txt.
2.0 (unreleased)
----------------
- Bug: enumerateUsers returned undesired results if an exact match
was required since LDAP searches are not case sensitive.
(https://bugs.launchpad.net/bugs/585901)

View File

@ -188,8 +188,12 @@ class LDAPMultiPlugin(LDAPPluginBase):
if exact_match and (id or login):
if id:
ldap_user = acl.getUserById(id)
if ldap_user is not None and ldap_user.getId() != id:
ldap_user = None
elif login:
ldap_user = acl.getUser(login)
if ldap_user is not None and ldap_user.getUserName() != login:
ldap_user = None
if ldap_user is not None:
qs = 'user_dn=%s' % quote_plus(ldap_user.getUserDN())