From 1d09c5a37f84b1567086376271cf4ac090928066 Mon Sep 17 00:00:00 2001 From: Alyx BB Date: Mon, 10 Jun 2024 22:39:44 +0100 Subject: [PATCH] fix: email is case sensitive #318 --- controllers/signup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/signup.go b/controllers/signup.go index 208c360a..079077ff 100644 --- a/controllers/signup.go +++ b/controllers/signup.go @@ -47,7 +47,7 @@ func (gic *SignUpController) Post(w http.ResponseWriter, r *http.Request) { } else { // Ignore an added @york.ac.uk (since we assume it) eduroam = strings.TrimSuffix(eduroam, "@york.ac.uk") - match, _ := regexp.MatchString("^[a-z]{1,6}[0-9]{1,6}$", eduroam) + match, _ := regexp.MatchString("^([a-z]|[A-Z]){1,6}[0-9]{1,6}$", eduroam) if !match { feedback = append(feedback, "The @york.ac.uk email you provided seems invalid") }