Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
b19b63e6
Unverified
Commit
b19b63e6
authored
4 years ago
by
Erik Johnston
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't 500 for invalid group IDs (#8628)
parent
a9f90fa7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/8628.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/8628.bugfix
synapse/handlers/groups_local.py
+4
-1
4 additions, 1 deletion
synapse/handlers/groups_local.py
with
5 additions
and
1 deletion
changelog.d/8628.bugfix
0 → 100644
+
1
−
0
View file @
b19b63e6
Fix handling of invalid group IDs to return a 400 rather than log an exception and return a 500.
This diff is collapsed.
Click to expand it.
synapse/handlers/groups_local.py
+
4
−
1
View file @
b19b63e6
...
...
@@ -17,7 +17,7 @@
import
logging
from
synapse.api.errors
import
HttpResponseException
,
RequestSendFailed
,
SynapseError
from
synapse.types
import
get_domain_from_id
from
synapse.types
import
GroupID
,
get_domain_from_id
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -28,6 +28,9 @@ def _create_rerouter(func_name):
"""
async
def
f
(
self
,
group_id
,
*
args
,
**
kwargs
):
if
not
GroupID
.
is_valid
(
group_id
):
raise
SynapseError
(
400
,
"
%s was not legal group ID
"
%
(
group_id
,))
if
self
.
is_mine_id
(
group_id
):
return
await
getattr
(
self
.
groups_server_handler
,
func_name
)(
group_id
,
*
args
,
**
kwargs
...
...
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