mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-14 18:32:14 -04:00
Check values are strings
This commit is contained in:
parent
8209b5f033
commit
0ab153d201
1 changed files with 4 additions and 1 deletions
|
@ -353,7 +353,10 @@ class GroupsServerHandler(object):
|
||||||
for keyname in ("name", "avatar_url", "short_description",
|
for keyname in ("name", "avatar_url", "short_description",
|
||||||
"long_description"):
|
"long_description"):
|
||||||
if keyname in content:
|
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)
|
yield self.store.update_group_profile(group_id, profile)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue