mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Ensure category and role ids are non-null
This commit is contained in:
parent
85fda57208
commit
cb3aee8219
@ -785,6 +785,9 @@ class FederationGroupsSummaryRoomsServlet(BaseFederationServlet):
|
|||||||
if get_domain_from_id(requester_user_id) != origin:
|
if get_domain_from_id(requester_user_id) != origin:
|
||||||
raise SynapseError(403, "requester_user_id doesn't match origin")
|
raise SynapseError(403, "requester_user_id doesn't match origin")
|
||||||
|
|
||||||
|
if category_id == "":
|
||||||
|
raise SynapseError(400, "category_id cannot be empty string")
|
||||||
|
|
||||||
resp = yield self.handler.update_group_summary_room(
|
resp = yield self.handler.update_group_summary_room(
|
||||||
group_id, requester_user_id,
|
group_id, requester_user_id,
|
||||||
room_id=room_id,
|
room_id=room_id,
|
||||||
@ -800,6 +803,9 @@ class FederationGroupsSummaryRoomsServlet(BaseFederationServlet):
|
|||||||
if get_domain_from_id(requester_user_id) != origin:
|
if get_domain_from_id(requester_user_id) != origin:
|
||||||
raise SynapseError(403, "requester_user_id doesn't match origin")
|
raise SynapseError(403, "requester_user_id doesn't match origin")
|
||||||
|
|
||||||
|
if category_id == "":
|
||||||
|
raise SynapseError(400, "category_id cannot be empty string")
|
||||||
|
|
||||||
resp = yield self.handler.delete_group_summary_room(
|
resp = yield self.handler.delete_group_summary_room(
|
||||||
group_id, requester_user_id,
|
group_id, requester_user_id,
|
||||||
room_id=room_id,
|
room_id=room_id,
|
||||||
@ -854,6 +860,9 @@ class FederationGroupsCategoryServlet(BaseFederationServlet):
|
|||||||
if get_domain_from_id(requester_user_id) != origin:
|
if get_domain_from_id(requester_user_id) != origin:
|
||||||
raise SynapseError(403, "requester_user_id doesn't match origin")
|
raise SynapseError(403, "requester_user_id doesn't match origin")
|
||||||
|
|
||||||
|
if category_id == "":
|
||||||
|
raise SynapseError(400, "category_id cannot be empty string")
|
||||||
|
|
||||||
resp = yield self.handler.upsert_group_category(
|
resp = yield self.handler.upsert_group_category(
|
||||||
group_id, requester_user_id, category_id, content,
|
group_id, requester_user_id, category_id, content,
|
||||||
)
|
)
|
||||||
@ -866,6 +875,9 @@ class FederationGroupsCategoryServlet(BaseFederationServlet):
|
|||||||
if get_domain_from_id(requester_user_id) != origin:
|
if get_domain_from_id(requester_user_id) != origin:
|
||||||
raise SynapseError(403, "requester_user_id doesn't match origin")
|
raise SynapseError(403, "requester_user_id doesn't match origin")
|
||||||
|
|
||||||
|
if category_id == "":
|
||||||
|
raise SynapseError(400, "category_id cannot be empty string")
|
||||||
|
|
||||||
resp = yield self.handler.delete_group_category(
|
resp = yield self.handler.delete_group_category(
|
||||||
group_id, requester_user_id, category_id,
|
group_id, requester_user_id, category_id,
|
||||||
)
|
)
|
||||||
@ -918,6 +930,9 @@ class FederationGroupsRoleServlet(BaseFederationServlet):
|
|||||||
if get_domain_from_id(requester_user_id) != origin:
|
if get_domain_from_id(requester_user_id) != origin:
|
||||||
raise SynapseError(403, "requester_user_id doesn't match origin")
|
raise SynapseError(403, "requester_user_id doesn't match origin")
|
||||||
|
|
||||||
|
if role_id == "":
|
||||||
|
raise SynapseError(400, "role_id cannot be empty string")
|
||||||
|
|
||||||
resp = yield self.handler.update_group_role(
|
resp = yield self.handler.update_group_role(
|
||||||
group_id, requester_user_id, role_id, content,
|
group_id, requester_user_id, role_id, content,
|
||||||
)
|
)
|
||||||
@ -930,6 +945,9 @@ class FederationGroupsRoleServlet(BaseFederationServlet):
|
|||||||
if get_domain_from_id(requester_user_id) != origin:
|
if get_domain_from_id(requester_user_id) != origin:
|
||||||
raise SynapseError(403, "requester_user_id doesn't match origin")
|
raise SynapseError(403, "requester_user_id doesn't match origin")
|
||||||
|
|
||||||
|
if role_id == "":
|
||||||
|
raise SynapseError(400, "role_id cannot be empty string")
|
||||||
|
|
||||||
resp = yield self.handler.delete_group_role(
|
resp = yield self.handler.delete_group_role(
|
||||||
group_id, requester_user_id, role_id,
|
group_id, requester_user_id, role_id,
|
||||||
)
|
)
|
||||||
@ -956,6 +974,9 @@ class FederationGroupsSummaryUsersServlet(BaseFederationServlet):
|
|||||||
if get_domain_from_id(requester_user_id) != origin:
|
if get_domain_from_id(requester_user_id) != origin:
|
||||||
raise SynapseError(403, "requester_user_id doesn't match origin")
|
raise SynapseError(403, "requester_user_id doesn't match origin")
|
||||||
|
|
||||||
|
if role_id == "":
|
||||||
|
raise SynapseError(400, "role_id cannot be empty string")
|
||||||
|
|
||||||
resp = yield self.handler.update_group_summary_user(
|
resp = yield self.handler.update_group_summary_user(
|
||||||
group_id, requester_user_id,
|
group_id, requester_user_id,
|
||||||
user_id=user_id,
|
user_id=user_id,
|
||||||
@ -971,6 +992,9 @@ class FederationGroupsSummaryUsersServlet(BaseFederationServlet):
|
|||||||
if get_domain_from_id(requester_user_id) != origin:
|
if get_domain_from_id(requester_user_id) != origin:
|
||||||
raise SynapseError(403, "requester_user_id doesn't match origin")
|
raise SynapseError(403, "requester_user_id doesn't match origin")
|
||||||
|
|
||||||
|
if role_id == "":
|
||||||
|
raise SynapseError(400, "role_id cannot be empty string")
|
||||||
|
|
||||||
resp = yield self.handler.delete_group_summary_user(
|
resp = yield self.handler.delete_group_summary_user(
|
||||||
group_id, requester_user_id,
|
group_id, requester_user_id,
|
||||||
user_id=user_id,
|
user_id=user_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user