mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-06 14:48:56 +01:00
Don't 500 when the email doesn't map to a valid user ID.
This commit is contained in:
parent
3c7d6202ea
commit
b02a342750
1 changed files with 4 additions and 0 deletions
|
@ -101,6 +101,10 @@ class LoginRestServlet(ClientV1RestServlet):
|
||||||
user_id = yield self.hs.get_datastore().get_user_id_by_threepid(
|
user_id = yield self.hs.get_datastore().get_user_id_by_threepid(
|
||||||
login_submission['medium'], login_submission['address']
|
login_submission['medium'], login_submission['address']
|
||||||
)
|
)
|
||||||
|
if not user_id:
|
||||||
|
raise LoginError(
|
||||||
|
401, "Unrecognised address", errcode=Codes.UNAUTHORIZED
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
user_id = login_submission['user']
|
user_id = login_submission['user']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue