Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
64f5a4a3
Unverified
Commit
64f5a4a3
authored
10 months ago
by
Erik Johnston
Committed by
GitHub
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/17250.misc
+1
-0
1 addition, 0 deletions
changelog.d/17250.misc
synapse/handlers/e2e_keys.py
+5
-0
5 additions, 0 deletions
synapse/handlers/e2e_keys.py
with
6 additions
and
0 deletions
changelog.d/17250.misc
0 → 100644
+
1
−
0
View file @
64f5a4a3
Stop logging errors when receiving invalid User IDs in key querys requests.
This diff is collapsed.
Click to expand it.
synapse/handlers/e2e_keys.py
+
5
−
0
View file @
64f5a4a3
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment