mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 05:12:18 -04:00
Hash passwords earlier in the registration process (#7523)
This commit is contained in:
parent
75fbc1a0c6
commit
56db0b1365
4 changed files with 31 additions and 31 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue