anonymousland-synapse/synapse/rest
Brendan Abolivier 95b3f952fa
Add a config flag to inhibit M_USER_IN_USE during registration (#11743)
This is mostly motivated by the tchap use case, where usernames are automatically generated from the user's email address (in a way that allows figuring out the email address from the username). Therefore, it's an issue if we respond to requests on /register and /register/available with M_USER_IN_USE, because it can potentially leak email addresses (which include the user's real name and place of work).

This commit adds a flag to inhibit the M_USER_IN_USE errors that are raised both by /register/available, and when providing a username early into the registration process. This error will still be raised if the user completes the registration process but the username conflicts. This is particularly useful when using modules (https://github.com/matrix-org/synapse/pull/11790 adds a module callback to set the username of users at registration) or SSO, since they can ensure the username is unique.

More context is available in the PR that introduced this behaviour to synapse-dinsic: matrix-org/synapse-dinsic#48 - as well as the issue in the matrix-dinsic repo: matrix-org/matrix-dinsic#476
2022-01-26 13:02:54 +01:00
..
admin Add admin API to get a list of federated rooms (#11658) 2022-01-25 16:11:40 +00:00
client Add a config flag to inhibit M_USER_IN_USE during registration (#11743) 2022-01-26 13:02:54 +01:00
consent Use direct references for configuration variables (part 4). (#10893) 2021-09-23 12:03:01 -04:00
key Add missing type hints to synapse.http. (#11571) 2021-12-14 07:00:47 -05:00
media Support rendering previews with data: URLs in them (#11767) 2022-01-24 08:58:18 -05:00
synapse Use direct references for configuration variables (part 5). (#10897) 2021-09-24 07:25:21 -04:00
__init__.py Misc typing fixes for tests, part 1 of N (#11323) 2021-11-12 15:50:54 +00:00
health.py Add missing type hints to non-client REST servlets. (#10817) 2021-09-15 08:45:32 -04:00
well_known.py Default value for public_baseurl (#11210) 2021-11-08 14:13:10 +00:00