mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-30 19:29:04 +01:00
Merge pull request #318 from matrix-org/syn-502-login-bad-emails
Don't 500 on /login when the email doesn't map to a valid user ID.
This commit is contained in:
commit
8627048787
1 changed files with 2 additions and 0 deletions
|
@ -101,6 +101,8 @@ 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(403, "", errcode=Codes.FORBIDDEN)
|
||||||
else:
|
else:
|
||||||
user_id = login_submission['user']
|
user_id = login_submission['user']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue