summary refs log tree commit diff
path: root/synapse/storage/registration.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-10 13:41:54 +0100
committerErik Johnston <erik@matrix.org>2015-04-10 13:41:54 +0100
commit7ed2ec3061b12ad79f3bd07da8758c5e41af8e5e (patch)
tree2172b59fd044f027b6c7b2fa031fd3c04e1219c7 /synapse/storage/registration.py
parentBump schema version (diff)
downloadsynapse-7ed2ec3061b12ad79f3bd07da8758c5e41af8e5e.tar.xz
Handle the fact that in sqlite binary data might be stored as unicode or bytes
Diffstat (limited to 'synapse/storage/registration.py')
-rw-r--r--synapse/storage/registration.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py
index f7d8291281..86fd2600fd 100644
--- a/synapse/storage/registration.py
+++ b/synapse/storage/registration.py
@@ -99,7 +99,9 @@ class RegistrationStore(SQLBaseStore):
         )
 
         if user_info:
-            user_info["password_hash"] = user_info["password_hash"].decode("utf8")
+            user_info["password_hash"] = self.database_engine.load_unicode(
+                user_info["password_hash"]
+            )
 
         defer.returnValue(user_info)