summary refs log tree commit diff
path: root/synapse/types.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-11-02 10:57:00 +0000
committerMark Haines <mark.haines@matrix.org>2015-11-02 10:57:00 +0000
commit0e367563838de76972bac1fd7bc3ab3943b9a57e (patch)
treef3de1ae204fa232033d8951c31a45a71a797d94c /synapse/types.py
parentSupport clients supplying older tokens, fix short poll test (diff)
parentMerge pull request #337 from matrix-org/markjh/v2_sync_joining (diff)
downloadsynapse-0e367563838de76972bac1fd7bc3ab3943b9a57e.tar.xz
Merge branch 'develop' into markjh/room_tags
Diffstat (limited to 'synapse/types.py')
-rw-r--r--synapse/types.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/types.py b/synapse/types.py
index 84631d177d..28344d8b36 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,
             ))