summary refs log tree commit diff
path: root/synapse/rest/client/v1
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-02-25 14:02:38 +0000
committerDavid Baker <dave@matrix.org>2015-02-25 14:02:38 +0000
commita025055643638ddb612ac16cf8deff8ae19ab1e0 (patch)
tree1f64454591234c8d4ca59c37a6dd28e1034f3edc /synapse/rest/client/v1
parentturns uris config options should append since it's a list (diff)
downloadsynapse-a025055643638ddb612ac16cf8deff8ae19ab1e0.tar.xz
SYWEB-278 Don't allow rules with no rule_id.
Diffstat (limited to 'synapse/rest/client/v1')
-rw-r--r--synapse/rest/client/v1/push_rule.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py
index b012f31084..73ba0494e6 100644
--- a/synapse/rest/client/v1/push_rule.py
+++ b/synapse/rest/client/v1/push_rule.py
@@ -214,7 +214,7 @@ def _rule_spec_from_path(path):
     template = path[0]
     path = path[1:]
 
-    if len(path) == 0:
+    if len(path) == 0 or len(path[0]) == 0:
         raise UnrecognizedRequestError()
 
     rule_id = path[0]