summary refs log tree commit diff
path: root/synapse/rest/consent/consent_resource.py
diff options
context:
space:
mode:
authorhera <matrix@hera.matrix.org>2018-11-08 11:03:08 +0000
committerRichard van der Hoff <richard@matrix.org>2018-11-08 11:05:39 +0000
commit2b075fb03a704865a759693989127cd5800e7fe6 (patch)
tree71873aa434e75be37c957a3b85459c782fea07c1 /synapse/rest/consent/consent_resource.py
parentPort hash_password to Python 3 (#4161) (diff)
downloadsynapse-2b075fb03a704865a759693989127cd5800e7fe6.tar.xz
Fix encoding error for consent form on python3
The form was rendering this as "b'01234....'".

-- richvdh
Diffstat (limited to 'synapse/rest/consent/consent_resource.py')
-rw-r--r--synapse/rest/consent/consent_resource.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/consent/consent_resource.py b/synapse/rest/consent/consent_resource.py
index e0f7de5d5c..8009b7ff1c 100644
--- a/synapse/rest/consent/consent_resource.py
+++ b/synapse/rest/consent/consent_resource.py
@@ -160,7 +160,9 @@ class ConsentResource(Resource):
         try:
             self._render_template(
                 request, "%s.html" % (version,),
-                user=username, userhmac=userhmac, version=version,
+                user=username,
+                userhmac=userhmac.decode('ascii'),
+                version=version,
                 has_consented=has_consented, public_version=public_version,
             )
         except TemplateNotFound: