diff options
author | Patrick Cloke <patrickc@matrix.org> | 2020-05-18 11:10:04 -0400 |
---|---|---|
committer | Patrick Cloke <patrickc@matrix.org> | 2020-05-18 11:10:04 -0400 |
commit | ee421e524478c1ad8d43741c27379499c2f6135c (patch) | |
tree | f89dfec1c42ba0e18c1eb71f94cd4742deeb17de /synapse/handlers | |
parent | Allow ReplicationRestResource to be added to workers (#7515) (diff) | |
parent | 1.13.0rc3 (diff) | |
download | synapse-ee421e524478c1ad8d43741c27379499c2f6135c.tar.xz |
Merge tag 'v1.13.0rc3' into develop
Synapse 1.13.0rc3 (2020-05-18) Bugfixes: - Hash passwords as early as possible during registration. #7523
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/register.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index 1e6bdac0ad..a6178e74a1 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -132,7 +132,7 @@ class RegistrationHandler(BaseHandler): def register_user( self, localpart=None, - password=None, + password_hash=None, guest_access_token=None, make_guest=False, admin=False, @@ -147,7 +147,7 @@ class RegistrationHandler(BaseHandler): Args: localpart: The local part of the user ID to register. If None, one will be generated. - password (unicode): The password to assign to this user so they can + password_hash (str|None): The hashed password to assign to this user so they can login again. This can be None which means they cannot login again via a password (e.g. the user is an application service user). user_type (str|None): type of user. One of the values from @@ -164,11 +164,6 @@ class RegistrationHandler(BaseHandler): yield self.check_registration_ratelimit(address) yield self.auth.check_auth_blocking(threepid=threepid) - password_hash = None - if password: - password_hash = yield defer.ensureDeferred( - self._auth_handler.hash(password) - ) if localpart is not None: yield self.check_username(localpart, guest_access_token=guest_access_token) |