Merge branch 'develop' into markjh/room_tags

This commit is contained in:
Mark Haines 2015-11-02 10:57:00 +00:00
commit 0e36756383
11 changed files with 339 additions and 30 deletions

View file

@ -47,7 +47,7 @@ class DomainSpecificString(
@classmethod
def from_string(cls, s):
"""Parse the string given by 's' into a structure object."""
if s[0] != cls.SIGIL:
if len(s) < 1 or s[0] != cls.SIGIL:
raise SynapseError(400, "Expected %s string to start with '%s'" % (
cls.__name__, cls.SIGIL,
))