mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
fix exception handling
This commit is contained in:
parent
afff321e9a
commit
67f3a50e9a
@ -437,7 +437,7 @@ class AuthHandler(BaseHandler):
|
|||||||
try:
|
try:
|
||||||
user_id, password_hash = yield self._find_user_id_and_pwd_hash(user_id)
|
user_id, password_hash = yield self._find_user_id_and_pwd_hash(user_id)
|
||||||
defer.returnValue(not self.validate_hash(password, password_hash))
|
defer.returnValue(not self.validate_hash(password, password_hash))
|
||||||
except:
|
except LoginError:
|
||||||
defer.returnValue(False)
|
defer.returnValue(False)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
@ -473,7 +473,7 @@ class AuthHandler(BaseHandler):
|
|||||||
|
|
||||||
defer.returnValue(True)
|
defer.returnValue(True)
|
||||||
except ldap.LDAPError, e:
|
except ldap.LDAPError, e:
|
||||||
logger.info("LDAP error: %s" % e)
|
logger.warn("LDAP error: %s", e)
|
||||||
defer.returnValue(False)
|
defer.returnValue(False)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
Loading…
Reference in New Issue
Block a user