changeset 1444:d17aa79768f0 beta

AD fix when search could return empty dn
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 15 Aug 2011 19:53:43 +0300
parents 7cbc901bb8e4
children c78f6bf52e9c
files rhodecode/lib/auth_ldap.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/auth_ldap.py	Sun Aug 14 23:51:40 2011 +0300
+++ b/rhodecode/lib/auth_ldap.py	Mon Aug 15 19:53:43 2011 +0300
@@ -119,6 +119,9 @@
                 raise ldap.NO_SUCH_OBJECT()
 
             for (dn, _attrs) in lobjects:
+                if dn is None:
+                    continue
+
                 try:
                     server.simple_bind_s(dn, password)
                     attrs = server.search_ext_s(dn, ldap.SCOPE_BASE,