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

@@ -101,7 +101,7 @@ func (m *AuthenticateMiddleware) tryGetUserByCookie(r *http.Request) (*models.Us
if err != nil {
return nil, err
}
if !utils.CheckPassword(user, login.Password) {
if !utils.CheckPassword(user, login.Password, m.config.PasswordSalt) {
return nil, errors.New("invalid password")
}
} else {