Changeset - 8e10ce55531d
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-08-02 17:09:55
marcin@python-works.com
Grafted from: 43f6f45d81c6
ldap requires only string attributes, fixes #435 ldap-does-not-work-with-non-latin-symbols
1 file changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/auth_ldap.py
Show inline comments
 
@@ -27,6 +27,7 @@ import logging
 

	
 
from rhodecode.lib.exceptions import LdapConnectionError, LdapUsernameError, \
 
    LdapPasswordError
 
from rhodecode.lib.utils2 import safe_str
 

	
 
log = logging.getLogger(__name__)
 

	
 
@@ -60,15 +61,15 @@ class AuthLdap(object):
 
        self.LDAP_SERVER_PORT = port
 

	
 
        # USE FOR READ ONLY BIND TO LDAP SERVER
 
        self.LDAP_BIND_DN = bind_dn
 
        self.LDAP_BIND_PASS = bind_pass
 
        self.LDAP_BIND_DN = safe_str(bind_dn)
 
        self.LDAP_BIND_PASS = safe_str(bind_pass)
 

	
 
        self.LDAP_SERVER = "%s://%s:%s" % (ldap_server_type,
 
                                           self.LDAP_SERVER_ADDRESS,
 
                                           self.LDAP_SERVER_PORT)
 

	
 
        self.BASE_DN = base_dn
 
        self.LDAP_FILTER = ldap_filter
 
        self.BASE_DN = safe_str(base_dn)
 
        self.LDAP_FILTER = safe_str(ldap_filter)
 
        self.SEARCH_SCOPE = getattr(ldap, 'SCOPE_%s' % search_scope)
 
        self.attr_login = attr_login
 

	
0 comments (0 inline, 0 general)