create-account: lower case user names

Second half of the fix towards lower-case user names. Refuse to create them
using our own CLI tool create-account.

Fixes #2073

Signed-off-by: Sebastian Späth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2022-01-31 15:12:03 +01:00
parent 1d5fd99cad
commit 0f10fff558

View file

@ -53,6 +53,8 @@ Arguments:
var (
username = flag.String("username", "", "The username of the account to register (specify the localpart only, e.g. 'alice' for '@alice:domain.com')")
# usernames are lower-case per spec
username = strings.ToLower(*username)
password = flag.String("password", "", "The password to associate with the account (optional, account will be password-less if not specified)")
pwdFile = flag.String("passwordfile", "", "The file to use for the password (e.g. for automated account creation)")
pwdStdin = flag.Bool("passwordstdin", false, "Reads the password from stdin")