0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-22 10:03:56 +01:00

Check values are strings

This commit is contained in:
Erik Johnston 2017-07-20 16:24:18 +01:00
parent 8209b5f033
commit 0ab153d201

View file

@ -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)