mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-01 13:34:18 -04:00
Check if group IDs are valid before using them. (#8977)
This commit is contained in:
parent
637282bb50
commit
b7c580e333
3 changed files with 47 additions and 4 deletions
|
@ -29,7 +29,7 @@ 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,))
|
||||
raise SynapseError(400, "%s is not a legal group ID" % (group_id,))
|
||||
|
||||
if self.is_mine_id(group_id):
|
||||
return await getattr(self.groups_server_handler, func_name)(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue