summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-19 09:30:52 +0100
committerErik Johnston <erik@matrix.org>2015-08-19 09:31:11 +0100
commitabc6986a24e7f843ffdfc1610833feb96462d5a8 (patch)
treed0944dc1b6d341920fa96cde102300772901cde7
parentMerge pull request #228 from matrix-org/erikj/_get_state_for_groups (diff)
downloadsynapse-abc6986a24e7f843ffdfc1610833feb96462d5a8.tar.xz
Fix regression where we incorrectly responded with a 200 to /login
-rw-r--r--synapse/handlers/auth.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 98d99dd0a8..4947c40519 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -283,7 +283,7 @@ class AuthHandler(BaseHandler):
             StoreError if there was a problem storing the token.
             LoginError if there was an authentication problem.
         """
-        self._check_password(user_id, password)
+        yield self._check_password(user_id, password)
 
         reg_handler = self.hs.get_handlers().registration_handler
         access_token = reg_handler.generate_token(user_id)
@@ -291,6 +291,7 @@ class AuthHandler(BaseHandler):
         yield self.store.add_access_token_to_user(user_id, access_token)
         defer.returnValue(access_token)
 
+    @defer.inlineCallbacks
     def _check_password(self, user_id, password):
         """Checks that user_id has passed password, raises LoginError if not."""
         user_info = yield self.store.get_user_by_id(user_id=user_id)