diff --git a/app/cli.py b/app/cli.py index 00c87bf6..09ff05f5 100644 --- a/app/cli.py +++ b/app/cli.py @@ -148,8 +148,8 @@ def register(app): user_name = input("Admin user name (ideally not 'admin'): ") email = input("Admin email address: ") password = input("Admin password: ") - while '@' in user_name: - print('User name cannot be an email address.') + while '@' in user_name or ' ' in user_name: + print('User name cannot be an email address or have spaces.') user_name = input("Admin user name (ideally not 'admin'): ") verification_token = random_token(16) private_key, public_key = RsaKeys.generate_keypair()