mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-07 15:41:53 +00:00
Encode unicode from json as utf-8. This was required to allow people to register on my laptop
This commit is contained in:
parent
3f08a7ad21
commit
a9a5329a11
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user