Commit 5d8f8021 authored by ale's avatar ale
Browse files

Trim spaces on submitted usernames

parent a7b1ae99
......@@ -252,7 +252,7 @@ func (l *Login) handleLogin(w http.ResponseWriter, req *http.Request, sess *logi
// 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.
Supports Markdown
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