summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-10-01 17:16:20 +0100
committerRichard van der Hoff <richard@matrix.org>2018-10-01 17:16:20 +0100
commit5908a8f6f5abd4fb08cf0c43e7ee51175d9bf7ac (patch)
tree212df92ddefaf749db59c2e431d768184540de19 /synapse/api
parentchangelog (diff)
parentUpdate instructions to point to pip install (#3985) (diff)
downloadsynapse-5908a8f6f5abd4fb08cf0c43e7ee51175d9bf7ac.tar.xz
Merge branch 'develop' into rav/fix_missing_create_event_error
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/filtering.py2
-rw-r--r--synapse/api/urls.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py
index a31a9a17e0..eed8c67e6a 100644
--- a/synapse/api/filtering.py
+++ b/synapse/api/filtering.py
@@ -226,7 +226,7 @@ class Filtering(object):
             jsonschema.validate(user_filter_json, USER_FILTER_SCHEMA,
                                 format_checker=FormatChecker())
         except jsonschema.ValidationError as e:
-            raise SynapseError(400, e.message)
+            raise SynapseError(400, str(e))
 
 
 class FilterCollection(object):
diff --git a/synapse/api/urls.py b/synapse/api/urls.py
index 71347912f1..6d9f1ca0ef 100644
--- a/synapse/api/urls.py
+++ b/synapse/api/urls.py
@@ -64,7 +64,7 @@ class ConsentURIBuilder(object):
         """
         mac = hmac.new(
             key=self._hmac_secret,
-            msg=user_id,
+            msg=user_id.encode('ascii'),
             digestmod=sha256,
         ).hexdigest()
         consent_uri = "%s_matrix/consent?%s" % (