diff options
Diffstat (limited to 'synapse/rest/client/room.py')
-rw-r--r-- | synapse/rest/client/room.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py index fb4d44211e..61fdf71a27 100644 --- a/synapse/rest/client/room.py +++ b/synapse/rest/client/room.py @@ -292,6 +292,9 @@ class RoomStateEventRestServlet(RestServlet): try: if event_type == EventTypes.Member: membership = content.get("membership", None) + if not isinstance(membership, str): + raise SynapseError(400, "Invalid membership (must be a string)") + event_id, _ = await self.room_member_handler.update_membership( requester, target=UserID.from_string(state_key), |