mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 09:33:53 +01:00
Fix logging errors when receiving invalid User ID for key querys (#17250)
This commit is contained in:
parent
7dd14fadb1
commit
64f5a4a353
2 changed files with 6 additions and 0 deletions
1
changelog.d/17250.misc
Normal file
1
changelog.d/17250.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Stop logging errors when receiving invalid User IDs in key querys requests.
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue