Show More
@@ -27,6 +27,7 b' import logging' | |||||
27 |
|
27 | |||
28 | from rhodecode.lib.exceptions import LdapConnectionError, LdapUsernameError, \ |
|
28 | from rhodecode.lib.exceptions import LdapConnectionError, LdapUsernameError, \ | |
29 | LdapPasswordError |
|
29 | LdapPasswordError | |
|
30 | from rhodecode.lib.utils2 import safe_str | |||
30 |
|
31 | |||
31 | log = logging.getLogger(__name__) |
|
32 | log = logging.getLogger(__name__) | |
32 |
|
33 | |||
@@ -60,15 +61,15 b' class AuthLdap(object):' | |||||
60 | self.LDAP_SERVER_PORT = port |
|
61 | self.LDAP_SERVER_PORT = port | |
61 |
|
62 | |||
62 | # USE FOR READ ONLY BIND TO LDAP SERVER |
|
63 | # USE FOR READ ONLY BIND TO LDAP SERVER | |
63 | self.LDAP_BIND_DN = bind_dn |
|
64 | self.LDAP_BIND_DN = safe_str(bind_dn) | |
64 | self.LDAP_BIND_PASS = bind_pass |
|
65 | self.LDAP_BIND_PASS = safe_str(bind_pass) | |
65 |
|
66 | |||
66 | self.LDAP_SERVER = "%s://%s:%s" % (ldap_server_type, |
|
67 | self.LDAP_SERVER = "%s://%s:%s" % (ldap_server_type, | |
67 | self.LDAP_SERVER_ADDRESS, |
|
68 | self.LDAP_SERVER_ADDRESS, | |
68 | self.LDAP_SERVER_PORT) |
|
69 | self.LDAP_SERVER_PORT) | |
69 |
|
70 | |||
70 | self.BASE_DN = base_dn |
|
71 | self.BASE_DN = safe_str(base_dn) | |
71 | self.LDAP_FILTER = ldap_filter |
|
72 | self.LDAP_FILTER = safe_str(ldap_filter) | |
72 | self.SEARCH_SCOPE = getattr(ldap, 'SCOPE_%s' % search_scope) |
|
73 | self.SEARCH_SCOPE = getattr(ldap, 'SCOPE_%s' % search_scope) | |
73 | self.attr_login = attr_login |
|
74 | self.attr_login = attr_login | |
74 |
|
75 |
General Comments 0
You need to be logged in to leave comments.
Login now