mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-18 16:24:18 -05:00
Fix regression where we incorrectly responded with a 200 to /login
This commit is contained in:
parent
e624cdec64
commit
abc6986a24
@ -283,7 +283,7 @@ class AuthHandler(BaseHandler):
|
|||||||
StoreError if there was a problem storing the token.
|
StoreError if there was a problem storing the token.
|
||||||
LoginError if there was an authentication problem.
|
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
|
reg_handler = self.hs.get_handlers().registration_handler
|
||||||
access_token = reg_handler.generate_token(user_id)
|
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)
|
yield self.store.add_access_token_to_user(user_id, access_token)
|
||||||
defer.returnValue(access_token)
|
defer.returnValue(access_token)
|
||||||
|
|
||||||
|
@defer.inlineCallbacks
|
||||||
def _check_password(self, user_id, password):
|
def _check_password(self, user_id, password):
|
||||||
"""Checks that user_id has passed password, raises LoginError if not."""
|
"""Checks that user_id has passed password, raises LoginError if not."""
|
||||||
user_info = yield self.store.get_user_by_id(user_id=user_id)
|
user_info = yield self.store.get_user_by_id(user_id=user_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user