diff options
author | David Baker <dave@matrix.org> | 2016-09-09 19:11:34 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-09-09 19:11:34 +0100 |
commit | b91e2833b3b59d6a8d104d8f6304383e68de2086 (patch) | |
tree | 4df820b06f89d7cb98ec6f75a99be4eebbd92ef6 /synapse/handlers/typing.py | |
parent | Add index to event_push_actions (diff) | |
parent | Merge pull request #1096 from matrix-org/markjh/get_access_token (diff) | |
download | synapse-b91e2833b3b59d6a8d104d8f6304383e68de2086.tar.xz |
Merge remote-tracking branch 'origin/develop' into dbkr/make_notif_highlight_query_fast
Diffstat (limited to 'synapse/handlers/typing.py')
-rw-r--r-- | synapse/handlers/typing.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index 0b530b9034..3b687957dd 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -199,7 +199,14 @@ class TypingHandler(object): user_id = content["user_id"] # Check that the string is a valid user id - UserID.from_string(user_id) + user = UserID.from_string(user_id) + + if user.domain != origin: + logger.info( + "Got typing update from %r with bad 'user_id': %r", + origin, user_id, + ) + return users = yield self.state.get_current_user_in_room(room_id) domains = set(get_domain_from_id(u) for u in users) |