summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-09-09 11:35:56 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-09-09 11:35:56 +0100
commit665dd9f7f8db2f8d38f454d4d5b96efcf163a5db (patch)
tree12edef9eaecb30b139d4cefe783ade384b49bce9 /synapse
parentMerge pull request #1 from matrix-org/babolivier/direct-avatar-name (diff)
downloadsynapse-665dd9f7f8db2f8d38f454d4d5b96efcf163a5db.tar.xz
Ensure the password reset template is correctly converted to binary
Regardless of the Python version
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/client/v2_alpha/account.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py

index 32770a4a95..20e1e01592 100644 --- a/synapse/rest/client/v2_alpha/account.py +++ b/synapse/rest/client/v2_alpha/account.py
@@ -17,6 +17,7 @@ import logging import re +from six import ensure_binary from six.moves import http_client import jinja2 @@ -295,7 +296,7 @@ class PasswordResetSubmitTokenServlet(RestServlet): ) request.setResponseCode(e.code) - request.write(html.encode('utf-8')) + request.write(ensure_binary(html)) finish_request(request) defer.returnValue(None)