mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 12:34:59 -04:00
Revert "Revert "Merge pull request #7315 from matrix-org/babolivier/request_token""
This reverts commit 1adf6a5587
.
This commit is contained in:
parent
fb825759e3
commit
2e3b9a0fcb
7 changed files with 121 additions and 3 deletions
|
@ -179,6 +179,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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue