summary refs log tree commit diff
path: root/synapse/handlers/room_member.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-12-07 14:17:15 +0000
committerErik Johnston <erik@matrix.org>2017-12-07 14:17:15 +0000
commitef045dcd71147f50e0144bc896e0a59ee5303061 (patch)
treed3a412931a184bf4dd24dd5333d41a8a16336d98 /synapse/handlers/room_member.py
parentPEP8 (diff)
downloadsynapse-ef045dcd71147f50e0144bc896e0a59ee5303061.tar.xz
Copy dict in update_membership too
Diffstat (limited to 'synapse/handlers/room_member.py')
-rw-r--r--synapse/handlers/room_member.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index 970fec0666..7e6467cd1d 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"]: