Commit 5d8f8021 authored by ale's avatar ale

Trim spaces on submitted usernames

parent a7b1ae99
Pipeline #5431 passed with stages
in 3 minutes and 10 seconds
......@@ -252,7 +252,7 @@ func (l *Login) handleLogin(w http.ResponseWriter, req *http.Request, sess *logi
sess.Reset()
// Case-fold usernames to lowercase.
username := strings.ToLower(req.FormValue("username"))
username := strings.ToLower(strings.TrimSpace(req.FormValue("username")))
password := req.FormValue("password")
// If the request is a POST, attempt login with username/password.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment