Only filter usernames >= 3 characters

* Fixes #1806
This commit is contained in:
JonnyWong16 2022-08-03 10:52:58 -07:00
parent 3ab0c8fe22
commit e7b96ed9ae
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -79,7 +79,7 @@ def filter_usernames(new_users=None):
new_users = [user['username'] for user in users.Users().get_users()]
for username in new_users:
if username.lower() not in ('local', 'guest') and username not in _FILTER_USERNAMES:
if username.lower() not in ('local', 'guest') and len(username) >= 3 and username not in _FILTER_USERNAMES:
_FILTER_USERNAMES.append(username)
_FILTER_USERNAMES = sorted(_FILTER_USERNAMES, key=len, reverse=True)