Skip to content
Snippets Groups Projects
Unverified Commit 64f5a4a3 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Fix logging errors when receiving invalid User ID for key querys (#17250)

parent 7dd14fad
No related branches found
No related tags found
No related merge requests found
Stop logging errors when receiving invalid User IDs in key querys requests.
...@@ -149,6 +149,11 @@ class E2eKeysHandler: ...@@ -149,6 +149,11 @@ class E2eKeysHandler:
remote_queries = {} remote_queries = {}
for user_id, device_ids in device_keys_query.items(): for user_id, device_ids in device_keys_query.items():
if not UserID.is_valid(user_id):
# Ignore invalid user IDs, which is the same behaviour as if
# the user existed but had no keys.
continue
# we use UserID.from_string to catch invalid user ids # we use UserID.from_string to catch invalid user ids
if self.is_mine(UserID.from_string(user_id)): if self.is_mine(UserID.from_string(user_id)):
local_query[user_id] = device_ids local_query[user_id] = device_ids
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment