anonymousland-synapse/tests/rest/client
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
..
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_account.py Use direct references for configuration variables (part 7). (#10959) 2021-10-04 07:18:54 -04:00
test_auth.py Use HTTPStatus constants in place of literals in tests.rest.client.test_auth. (#11520) 2021-12-08 14:54:47 +00:00
test_capabilities.py Rename get_access_token_for_user_id method to create_access_token_for_user_id (#11369) 2021-11-17 14:10:57 +00:00
test_consent.py Default value for public_baseurl (#11210) 2021-11-08 14:13:10 +00:00
test_directory.py Test room alias deletion (#11327) 2021-11-12 19:56:00 +00:00
test_ephemeral_message.py Flatten the synapse.rest.client package (#10600) 2021-08-17 11:57:58 +00:00
test_events.py Flatten tests/rest/client/{v1,v2_alpha} too (#10667) 2021-08-20 17:50:44 +01:00
test_filter.py Flatten tests/rest/client/{v1,v2_alpha} too (#10667) 2021-08-20 17:50:44 +01:00
test_groups.py Merge branch 'master' into develop 2021-08-31 14:09:48 +01:00
test_identity.py Use direct references for configuration variables (part 7). (#10959) 2021-10-04 07:18:54 -04:00
test_keys.py Flatten tests/rest/client/{v1,v2_alpha} too (#10667) 2021-08-20 17:50:44 +01:00
test_login.py Add config for customizing the claim used for JWT logins. (#11361) 2021-11-22 13:01:03 -05:00
test_password_policy.py Flatten tests/rest/client/{v1,v2_alpha} too (#10667) 2021-08-20 17:50:44 +01:00
test_power_levels.py Validate new m.room.power_levels events (#10232) 2021-08-26 17:07:58 +01:00
test_presence.py Use direct references for configuration variables (part 6). (#10916) 2021-09-29 06:44:15 -04:00
test_profile.py Flatten tests/rest/client/{v1,v2_alpha} too (#10667) 2021-08-20 17:50:44 +01:00
test_push_rule_attrs.py Flatten tests/rest/client/{v1,v2_alpha} too (#10667) 2021-08-20 17:50:44 +01:00
test_redactions.py Flatten the synapse.rest.client package (#10600) 2021-08-17 11:57:58 +00:00
test_register.py Add a config flag to inhibit M_USER_IN_USE during registration (#11743) 2022-01-26 13:02:54 +01:00
test_relations.py Do not try to serialize raw aggregations dict. (#11791) 2022-01-21 10:31:31 +00:00
test_report_event.py Flatten tests/rest/client/{v1,v2_alpha} too (#10667) 2021-08-20 17:50:44 +01:00
test_retention.py Bundle aggregations outside of the serialization method. (#11612) 2022-01-07 09:10:46 -05:00
test_room_batch.py Test to ensure we share the same state_group across the whole historical batch (MSC2716) (#11487) 2021-12-10 20:59:20 -06:00
test_rooms.py Support filtering by relations per MSC3440 (#11236) 2021-11-09 08:10:58 -05:00
test_sendtodevice.py Flatten tests/rest/client/{v1,v2_alpha} too (#10667) 2021-08-20 17:50:44 +01:00
test_shadow_banned.py Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
test_shared_rooms.py Flatten tests/rest/client/{v1,v2_alpha} too (#10667) 2021-08-20 17:50:44 +01:00
test_sync.py Require body for read receipts with user-agent exceptions (#11157) 2021-11-09 10:26:07 +00:00
test_third_party_rules.py Make check_event_allowed module API callback not fail open (accept events) when an exception is raised (#11033) 2021-11-01 15:45:56 +00:00
test_transactions.py Use mock from the stdlib. (#9772) 2021-04-09 13:44:38 -04:00
test_typing.py Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
test_upgrade_room.py Handle room upgrades for spaces (#10774) 2021-09-10 07:30:05 -04:00
utils.py Test that bans win a join against a race when computing /sync response (#11701) 2022-01-07 16:43:21 +00:00