Skip to content
Snippets Groups Projects
Commit 0ab153d2 authored by Erik Johnston's avatar Erik Johnston
Browse files

Check values are strings

parent 8209b5f0
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment