1
0

Don't assign numeric IDs for empty usernames (#6690)

* commit '2d07c7377':
  Don't assign numeric IDs for empty usernames (#6690)
This commit is contained in:
Andrew Morgan
2020-03-23 11:33:32 +00:00
2 changed files with 2 additions and 1 deletions

1
changelog.d/6690.bugfix Normal file
View File

@@ -0,0 +1 @@
Fix a bug where we would assign a numeric userid if somebody tried registering with an empty username.

View File

@@ -177,7 +177,7 @@ class RegistrationHandler(BaseHandler):
if 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)
was_guest = guest_access_token is not None