summary refs log tree commit diff
path: root/synapse/groups
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-07-20 16:24:18 +0100
committerErik Johnston <erik@matrix.org>2017-07-20 16:24:18 +0100
commit0ab153d2014d871c13b02dbd1c6bf7c0cc0bcedc (patch)
tree988c52d9a299f3b9779da79de30901880eb72990 /synapse/groups
parentFix a storage desc (diff)
downloadsynapse-0ab153d2014d871c13b02dbd1c6bf7c0cc0bcedc.tar.xz
Check values are strings
Diffstat (limited to 'synapse/groups')
-rw-r--r--synapse/groups/groups_server.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py
index 322aad2a6f..b1ee43ef90 100644
--- a/synapse/groups/groups_server.py
+++ b/synapse/groups/groups_server.py
@@ -353,7 +353,10 @@ class GroupsServerHandler(object):
         for keyname in ("name", "avatar_url", "short_description",
                         "long_description"):
             if keyname in content:
-                profile[keyname] = content[keyname]
+                value = content[keyname]
+                if not isinstance(value, basestring):
+                    raise SynapseError(400, "%r value is not a string" % (keyname,))
+                profile[keyname] = value
 
         yield self.store.update_group_profile(group_id, profile)