Fix: check user pass only if user exists
This commit is contained in:
		| @@ -92,11 +92,12 @@ func HandleFrontLogin(w http.ResponseWriter, r *http.Request) { | ||||
| 		log.Debug("making new player", "error", err, "state", userstate) | ||||
| 		userstate = models.InitPlayer(cleanName) | ||||
| 		makeplayer = true | ||||
| 	} | ||||
| 	if userstate.Password != clearPass { | ||||
| 		log.Error("wrong password", "username", cleanName, "password", clearPass) | ||||
| 		abortWithError(w, "wrong password") | ||||
| 		return | ||||
| 	} else { | ||||
| 		if userstate.Password != clearPass { | ||||
| 			log.Error("wrong password", "username", cleanName, "password", clearPass) | ||||
| 			abortWithError(w, "wrong password") | ||||
| 			return | ||||
| 		} | ||||
| 	} | ||||
| 	http.SetCookie(w, cookie) | ||||
| 	fi := &models.FullInfo{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder