diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2015-10-27 15:20:57 +0000 |
---|---|---|
committer | Richard van der Hoff <github@rvanderhoff.org.uk> | 2015-10-27 15:20:57 +0000 |
commit | d0b1968a4cfcf4289d2b519fa141af2495431a4b (patch) | |
tree | 24915683079b7031654130f3aa1985f84b5b6a7f /synapse | |
parent | Merge pull request #328 from matrix-org/erikj/search (diff) | |
parent | Fix a 500 error resulting from empty room_ids (diff) | |
download | synapse-d0b1968a4cfcf4289d2b519fa141af2495431a4b.tar.xz |
Merge pull request #331 from matrix-org/rav/500_on_missing_sigil
Fix a 500 error resulting from empty room_ids
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, )) |