diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-04-09 23:54:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-09 23:54:05 +0100 |
commit | 87478c5a6007b2a21933c1200f2741b6f3d0df3e (patch) | |
tree | 06221bbafb5a936ea7c19d7ae856b93a7ce3ff2e /synapse/rest/client/v1/register.py | |
parent | Merge pull request #3073 from NotAFile/use-six-reraise (diff) | |
parent | Add b prefixes to some strings that are bytes in py3 (diff) | |
download | synapse-87478c5a6007b2a21933c1200f2741b6f3d0df3e.tar.xz |
Merge pull request #3061 from NotAFile/add-some-byte-strings
Add b prefixes to some strings that are bytes in py3
Diffstat (limited to 'synapse/rest/client/v1/register.py')
-rw-r--r-- | synapse/rest/client/v1/register.py | 4 |
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 |