From 0f10fff5583b3d5dda6d7e17434a3927122ab976 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Mon, 31 Jan 2022 15:12:03 +0100 Subject: [PATCH] create-account: lower case user names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cmd/create-account/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/create-account/main.go b/cmd/create-account/main.go index 3ac077705..e1fda3c92 100644 --- a/cmd/create-account/main.go +++ b/cmd/create-account/main.go @@ -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")