mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-05 00:56:39 -04:00
Don't assign numeric IDs for empty usernames (#6690)
Fix a bug where we would assign a numeric userid if somebody tried registering with an empty username
This commit is contained in:
parent
3cfac9593c
commit
2d07c73777
2 changed files with 2 additions and 1 deletions
1
changelog.d/6690.bugfix
Normal file
1
changelog.d/6690.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix a bug where we would assign a numeric userid if somebody tried registering with an empty username.
|
|
@ -174,7 +174,7 @@ class RegistrationHandler(BaseHandler):
|
||||||
if password:
|
if password:
|
||||||
password_hash = yield self._auth_handler.hash(password)
|
password_hash = yield self._auth_handler.hash(password)
|
||||||
|
|
||||||
if localpart:
|
if localpart is not None:
|
||||||
yield self.check_username(localpart, guest_access_token=guest_access_token)
|
yield self.check_username(localpart, guest_access_token=guest_access_token)
|
||||||
|
|
||||||
was_guest = guest_access_token is not None
|
was_guest = guest_access_token is not None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue