Skip to content
Snippets Groups Projects
Commit 285b177c authored by ale's avatar ale
Browse files

Always convert usernames to lowercase in form input

parent a218499d
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment