diff options
author | Erik Johnston <erik@matrix.org> | 2017-07-20 16:24:18 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-07-20 16:24:18 +0100 |
commit | 0ab153d2014d871c13b02dbd1c6bf7c0cc0bcedc (patch) | |
tree | 988c52d9a299f3b9779da79de30901880eb72990 /synapse/groups/groups_server.py | |
parent | Fix a storage desc (diff) | |
download | synapse-0ab153d2014d871c13b02dbd1c6bf7c0cc0bcedc.tar.xz |
Check values are strings
Diffstat (limited to '')
-rw-r--r-- | synapse/groups/groups_server.py | 5 |
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) |