Skip to content
Snippets Groups Projects
Commit 544722ba authored by David Baker's avatar David Baker
Browse files

Work around client replacing reg params

Works around https://github.com/vector-im/vector-android/issues/715
and equivalent for iOS
parent 9d58ccc5
No related branches found
No related tags found
No related merge requests found
......@@ -169,6 +169,18 @@ class RegisterRestServlet(RestServlet):
guest_access_token = body.get("guest_access_token", None)
if (
'initial_device_display_name' in body and
'password' not in body
):
# ignore 'initial_device_display_name' if sent without
# a password to work around a client bug where it sent
# the 'initial_device_display_name' param alone, wiping out
# the original registration params
logger.warn("Ignoring initial_device_display_name without password")
del body['initial_device_display_name']
session_id = self.auth_handler.get_session_id(body)
registered_user_id = None
if session_id:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment