-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure we advertise registration as disabled when MSC3861 is enabled #17661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change looks fine. Could you point to where in the MSCs it says this endpoint should return an errcode
of M_FORBIDDEN
?
self.expect_forbidden( | ||
"POST", | ||
"/_matrix/client/v3/register", | ||
{"username": "alice", "password": "hunter2"}, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a test that checks that this endpoint still returns a 200 when an AS attempts to register a user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a test to cover that
This is aligned with the spec: a 403 should be raised when registration is disabled https://spec.matrix.org/v1.13/client-server-api/#post_matrixclientv3register |
This has been a problem with Element Web, as it will proble /register with an empty body, which gave this error:
And Element Web would choke on it. This changes that so we reply instead:
Also adds a test for this.
See element-hq/element-web#27993