home_server field in registration response is deprecated
timmc opened this issue · comments
How did you install matrix-registration?
pip
What python version are you running?
3.9.2
What version of matrix-registration are you running?
latest
Your config.yml
No response
Your error log
[2023-03-01 03:32:00,027] ERROR in app: Exception on /register [POST]
Traceback (most recent call last):
File "/srv/commdata/stg_matrix/regui/venv_py3.9.2/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/srv/commdata/stg_matrix/regui/venv_py3.9.2/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/srv/commdata/stg_matrix/regui/venv_py3.9.2/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/srv/commdata/stg_matrix/regui/venv_py3.9.2/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/srv/commdata/stg_matrix/regui/venv_py3.9.2/lib/python3.9/site-packages/matrix_registration/api.py", line 224, in register
home_server=account_data["home_server"],
KeyError: 'home_server'
Area of your issue?
general usage
What happened
Dendrite v0.10.9 stopped sending the home_server field in the registration response, which breaks matrix-registration. It turns out this is deprecated (search for home_server
) and I'm guessing it will be removed from Synapse in due time as well.
This causes registration to succeed but matrix-registration's backend returns a 500 and the UI appears to do nothing.
Steps to reproduce
No response
To save a bit of time: the propsed solution is to split off the server part from the full user id instead of relying on the home_server value that used to be handed back.
Very simple PR to fix: #105 -- turns out the field was fetched from the response but wasn't actually used.
Yay, code simplification:-). Thanks for the quick response