From 4f675dc5aa8f96ca6449ddd67b8a3ba8833ef2c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 9 Apr 2014 15:25:41 +0200 Subject: [PATCH] add workaround for bug in Products.LDAPUserFolder (#4663) --- Products/LDAPMultiPlugins/LDAPPluginBase.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Products/LDAPMultiPlugins/LDAPPluginBase.py b/Products/LDAPMultiPlugins/LDAPPluginBase.py index 62971ab..9f3a290 100644 --- a/Products/LDAPMultiPlugins/LDAPPluginBase.py +++ b/Products/LDAPMultiPlugins/LDAPPluginBase.py @@ -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