When logging in fetch user by user_id case insensitively, *unless* there are multiple case insensitive matches, in which case require the exact user_id

This commit is contained in:
Erik Johnston 2015-08-21 11:34:43 +01:00
parent aa3c9c7bd0
commit 42f12ad92f
3 changed files with 31 additions and 12 deletions

View file

@ -83,9 +83,10 @@ class LoginRestServlet(ClientV1RestServlet):
if not user_id.startswith('@'):
user_id = UserID.create(
user_id, self.hs.hostname).to_string()
user_id, self.hs.hostname
).to_string()
token = yield self.handlers.auth_handler.login_with_password(
user_id, token = yield self.handlers.auth_handler.login_with_password(
user_id=user_id,
password=login_submission["password"])