0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-29 16:08:21 +02:00
synapse/synapse
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
..
_scripts Add a flag to the synapse_review_recent_signups script to ignore and filter appservice users. (#11675) 2022-01-17 16:43:25 +00:00
api Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
app Check that gc method is available before using in synapse/app/_base (#11816) 2022-01-25 10:35:18 -08:00
appservice Add missing type hints to synapse.appservice (#11360) 2021-12-14 17:02:46 +00:00
config Add a config flag to inhibit M_USER_IN_USE during registration (#11743) 2022-01-26 13:02:54 +01:00
crypto Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
events Fix another jsonschema typecheck error (#11830) 2022-01-25 15:29:28 -05:00
federation Add admin API to reset connection timeouts for remote server (#11639) 2022-01-25 12:06:29 +00:00
groups Add type annotations to synapse.metrics (#10847) 2021-11-17 19:07:02 +00:00
handlers Add a config flag to inhibit M_USER_IN_USE during registration (#11743) 2022-01-26 13:02:54 +01:00
http Apply a timeout to reading the body when fetching a file. (#11784) 2022-01-24 14:38:37 +00:00
logging Add missing auto_attribs=True to the _WrappedRustReporter class (#11768) 2022-01-19 12:39:11 +00:00
metrics Fix mypy for platforms without epoll support. (#11771) 2022-01-19 16:50:09 +00:00
module_api Fix ModuleApi.looping_background_call for non-async functions (#11524) 2021-12-07 11:41:31 +00:00
push Fix missing app variable in mail subject (#11745) 2022-01-13 20:19:10 +00:00
replication Stop reading from event_reference_hashes (#11794) 2022-01-21 09:18:10 +00:00
res
rest Add a config flag to inhibit M_USER_IN_USE during registration (#11743) 2022-01-26 13:02:54 +01:00
server_notices disallow-untyped-defs for synapse.server_notices (#11021) 2021-10-07 19:55:15 +01:00
spam_checker_api
state Remove log_function and its uses (#11761) 2022-01-18 13:06:04 +00:00
static
storage Add admin API to get a list of federated rooms (#11658) 2022-01-25 16:11:40 +00:00
streams Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
util Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
__init__.py Merge branch 'master' into develop 2022-01-25 12:52:27 +00:00
event_auth.py Check *all* auth events for room id and rejection (#11009) 2021-10-18 18:28:30 +01:00
notifier.py Remove log_function and its uses (#11761) 2022-01-18 13:06:04 +00:00
py.typed Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
python_dependencies.py Drop support for and remove references to EOL Python 3.6 (#11683) 2022-01-21 14:23:26 -08:00
server.py Bundle aggregations outside of the serialization method. (#11612) 2022-01-07 09:10:46 -05:00
types.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
visibility.py Make the get_global_account_data_by_type_for_user cache be a tree-cache whose key is prefixed with the user ID (#11788) 2022-01-21 08:38:36 +00:00