diff options
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/types.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/types.py b/synapse/types.py index 9cffc33d27..8c51e00e8a 100644 --- a/synapse/types.py +++ b/synapse/types.py @@ -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, )) |