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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user