Commit 285b177c authored by ale's avatar ale

Always convert usernames to lowercase in form input

parent a218499d
Pipeline #3703 passed with stages
in 4 minutes and 4 seconds
......@@ -199,7 +199,8 @@ func (l *loginHandler) dispatch(w http.ResponseWriter, req *http.Request, sessio
// Handle password-based login.
func (l *loginHandler) handlePassword(w http.ResponseWriter, req *http.Request, session *loginSession) (loginState, []byte, error) {
username := req.FormValue("username")
// Case-fold usernames to lowercase.
username := strings.ToLower(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