summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <lightportal@gmail.com>2014-08-24 11:28:00 +0100
committerErik Johnston <lightportal@gmail.com>2014-08-24 11:29:29 +0100
commita9a5329a1166e13ec490ef239d94b2dcc51f5d72 (patch)
tree3ce40a0c0eed2f31f552d642021ed79e916fcb4a /synapse
parentoops (diff)
downloadsynapse-a9a5329a1166e13ec490ef239d94b2dcc51f5d72.tar.xz
Encode unicode from json as utf-8. This was required to allow people to register on my laptop
Diffstat (limited to '')
-rw-r--r--synapse/rest/register.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/register.py b/synapse/rest/register.py
index eb457562b9..f17ec11cf4 100644
--- a/synapse/rest/register.py
+++ b/synapse/rest/register.py
@@ -33,10 +33,10 @@ class RegisterRestServlet(RestServlet):
         try:
             register_json = json.loads(request.content.read())
             if "password" in register_json:
-                password = register_json["password"]
+                password = register_json["password"].encode("utf-8")
 
             if type(register_json["user_id"]) == unicode:
-                desired_user_id = register_json["user_id"]
+                desired_user_id = register_json["user_id"].encode("utf-8")
                 if urllib.quote(desired_user_id) != desired_user_id:
                     raise SynapseError(
                         400,