Skip to content
Snippets Groups Projects
Commit 86270487 authored by Kegsay's avatar Kegsay
Browse files

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.
parents f5105863 ede07434
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,8 @@ class LoginRestServlet(ClientV1RestServlet):
user_id = yield self.hs.get_datastore().get_user_id_by_threepid(
login_submission['medium'], login_submission['address']
)
if not user_id:
raise LoginError(403, "", errcode=Codes.FORBIDDEN)
else:
user_id = login_submission['user']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment