summary refs log tree commit diff
path: root/synapse/rest/client/v1/register.py
diff options
context:
space:
mode:
authorkaiyou <pierre@jaury.eu>2018-05-02 20:22:41 +0200
committerkaiyou <pierre@jaury.eu>2018-05-02 20:22:41 +0200
commit9a779c2ddb88f875d3ceec4ff02bdb922a0c57c6 (patch)
tree1034b986ea37a081707b489cb3ebe6e4d584defe /synapse/rest/client/v1/register.py
parentMake the logging level configurable (diff)
parentmissing word :| (diff)
downloadsynapse-9a779c2ddb88f875d3ceec4ff02bdb922a0c57c6.tar.xz
Merge remote-tracking branch 'upstream/master' into feat-dockerfile
Diffstat (limited to 'synapse/rest/client/v1/register.py')
-rw-r--r--synapse/rest/client/v1/register.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/register.py b/synapse/rest/client/v1/register.py
index 5c5fa8f7ab..8a82097178 100644
--- a/synapse/rest/client/v1/register.py
+++ b/synapse/rest/client/v1/register.py
@@ -348,9 +348,9 @@ class RegisterRestServlet(ClientV1RestServlet):
         admin = register_json.get("admin", None)
 
         # Its important to check as we use null bytes as HMAC field separators
-        if "\x00" in user:
+        if b"\x00" in user:
             raise SynapseError(400, "Invalid user")
-        if "\x00" in password:
+        if b"\x00" in password:
             raise SynapseError(400, "Invalid password")
 
         # str() because otherwise hmac complains that 'unicode' does not