diff options
author | Kegsay <kegsay@gmail.com> | 2015-10-21 10:16:33 +0100 |
---|---|---|
committer | Kegsay <kegsay@gmail.com> | 2015-10-21 10:16:33 +0100 |
commit | 862704878759247506819961f1e9212a2eb74b48 (patch) | |
tree | 02cd195d3afb8244e346fc0e7849cf5012bd6197 /synapse | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into develop (diff) | |
parent | Use 403 and message to match handlers/auth (diff) | |
download | synapse-862704878759247506819961f1e9212a2eb74b48.tar.xz |
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.
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/rest/client/v1/login.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index dacc416055..e71cf7e43e 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -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'] |