add workaround for bug in Products.LDAPUserFolder (#4663)

This commit is contained in:
Frédéric Péters 2014-04-09 15:25:41 +02:00
parent 698502b8c8
commit 4f675dc5aa
1 changed files with 7 additions and 1 deletions

View File

@ -81,7 +81,13 @@ class LDAPPluginBase(Folder, BasePlugin, Cacheable):
if not acl or not login or not password:
return None, None
user = acl.getUser(login, pwd=password)
try:
user = acl.getUser(login, pwd=password)
except IndexError:
# workaround bug in Products.LDAPUserFolder that happens when the
# login is an accentuated variant of an existing login and the
# password is correct :/
return None, None
if user is None:
return None, None