From ef045dcd71147f50e0144bc896e0a59ee5303061 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 7 Dec 2017 14:17:15 +0000 Subject: [PATCH] Copy dict in update_membership too --- synapse/handlers/room_member.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index 970fec066..7e6467cd1 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -189,6 +189,10 @@ class RoomMemberHandler(BaseHandler): content_specified = bool(content) if content is None: content = {} + else: + # We do a copy here as we potentially change some keys + # later on. + content = dict(content) effective_membership_state = action if action in ["kick", "unban"]: