From bccbeae9adea47d0d2c8f4119123d02dd402f1d1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 7 May 2024 12:44:15 -0400 Subject: [PATCH] case and log --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 0e93015..31b603f 100644 --- a/main.go +++ b/main.go @@ -151,6 +151,7 @@ recreation@pinnaclelake.com|{SHA512-CRYPT}$6$uTiy7Q5xn1CIN22w$3VAElns3TFfejtdTCT // createPasswordEntry: input email and plain text password, output a password entry with sha512-crypt. func modifyPasswordFile(email, password string) bool { + email=strings.ToLower(email) log.Printf("Changing password for %s", email) // read the password file // find the entry with the given email @@ -173,7 +174,7 @@ func modifyPasswordFile(email, password string) bool { if len(tmp) != 2 { continue } - if tmp[0]==strings.ToLower(email) { + if tmp[0]==email { line = createPasswordEntry(email, password) } out.WriteString(line)