summary refs log tree commit diff
path: root/tests/rest/client/v2_alpha/test_account.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-04-23 10:38:57 +0200
committerGitHub <noreply@github.com>2020-04-23 10:38:57 +0200
commit6f4319368b3afab661c55367b9348f9b77bc04a5 (patch)
tree5e009c19cceb24b38471762ecc63520ab154decd /tests/rest/client/v2_alpha/test_account.py
parentImprove example TURN configuration in documentation (#7284) (diff)
parentConfig option to inhibit 3PID errors on /requestToken (diff)
downloadsynapse-6f4319368b3afab661c55367b9348f9b77bc04a5.tar.xz
Merge pull request #7315 from matrix-org/babolivier/request_token
Config option to inhibit 3PID errors on /requestToken
Diffstat (limited to 'tests/rest/client/v2_alpha/test_account.py')
-rw-r--r--tests/rest/client/v2_alpha/test_account.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rest/client/v2_alpha/test_account.py b/tests/rest/client/v2_alpha/test_account.py

index c3facc00eb..de72dc9a40 100644 --- a/tests/rest/client/v2_alpha/test_account.py +++ b/tests/rest/client/v2_alpha/test_account.py
@@ -178,6 +178,22 @@ class PasswordResetTestCase(unittest.HomeserverTestCase): # Assert we can't log in with the new password self.attempt_wrong_password_login("kermit", new_password) + @unittest.override_config({"request_token_inhibit_3pid_errors": True}) + def test_password_reset_bad_email_inhibit_error(self): + """Test that triggering a password reset with an email address that isn't bound + to an account doesn't leak the lack of binding for that address if configured + that way. + """ + self.register_user("kermit", "monkey") + self.login("kermit", "monkey") + + email = "test@example.com" + + client_secret = "foobar" + session_id = self._request_token(email, client_secret) + + self.assertIsNotNone(session_id) + def _request_token(self, email, client_secret): request, channel = self.make_request( "POST",