1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat: use bcrypt with salts instead of md5 for hashing password (resolve #21)

This commit is contained in:
Ferdinand Mütsch
2020-05-25 21:42:45 +02:00
parent 625994d1e9
commit 08675bd99f
9 changed files with 30 additions and 22 deletions

View File

@@ -76,7 +76,7 @@ func (h *IndexHandler) Login(w http.ResponseWriter, r *http.Request) {
return
}
if !utils.CheckPassword(user, login.Password) {
if !utils.CheckPassword(user, login.Password, h.config.PasswordSalt) {
respondAlert(w, "invalid credentials", "", "", http.StatusUnauthorized)
return
}