Catch all LDAP exceptions
This commit is contained in:
parent
51853a22bc
commit
f39d90caa9
@ -49,7 +49,7 @@ def has_right(owner, user, password):
|
|||||||
log.LOGGER.debug("User %s found" % user)
|
log.LOGGER.debug("User %s found" % user)
|
||||||
try:
|
try:
|
||||||
CONNEXION.simple_bind_s(users[0][0], password or "")
|
CONNEXION.simple_bind_s(users[0][0], password or "")
|
||||||
except ldap.INVALID_CREDENTIALS:
|
except ldap.LDAPError:
|
||||||
log.LOGGER.debug("Invalid credentials")
|
log.LOGGER.debug("Invalid credentials")
|
||||||
else:
|
else:
|
||||||
log.LOGGER.debug("LDAP bind OK")
|
log.LOGGER.debug("LDAP bind OK")
|
||||||
|
Loading…
Reference in New Issue
Block a user