Remove salt from bcrypt password, because it's useless
This commit is contained in:
2
timer.go
2
timer.go
@ -269,7 +269,7 @@ func (server *TimerServer) handlePostLogin(w http.ResponseWriter, r *http.Reques
|
||||
return
|
||||
}
|
||||
|
||||
err := bcrypt.CompareHashAndPassword(user.Password, []byte(user.Salt+userPass))
|
||||
err := bcrypt.CompareHashAndPassword(user.Password, []byte(userPass))
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
view.LoginFormError(nil, "Incorrect credentials").Render(context.Background(), w)
|
||||
|
Reference in New Issue
Block a user