Show More
@@ -293,7 +293,8 b' class AuthLdap(object):' | |||
|
293 | 293 | log.warning(msg, username) |
|
294 | 294 | raise LdapPasswordError(msg) |
|
295 | 295 | if "," in username: |
|
296 |
raise LdapUsernameError( |
|
|
296 | raise LdapUsernameError( | |
|
297 | "invalid character `,` in username: `{}`".format(username)) | |
|
297 | 298 | try: |
|
298 | 299 | server = self._get_ldap_server() |
|
299 | 300 | filter_ = '(&%s(%s=%s))' % ( |
@@ -319,8 +320,9 b' class AuthLdap(object):' | |||
|
319 | 320 | break |
|
320 | 321 | |
|
321 | 322 | else: |
|
322 |
raise LdapPasswordError( |
|
|
323 | 'with given password') | |
|
323 | raise LdapPasswordError( | |
|
324 | 'Failed to authenticate user `{}`' | |
|
325 | 'with given password'.format(username)) | |
|
324 | 326 | |
|
325 | 327 | except ldap.NO_SUCH_OBJECT: |
|
326 | 328 | log.debug("LDAP says no such user '%s' (%s), org_exc:", |
General Comments 0
You need to be logged in to leave comments.
Login now