mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: don't trim hash
This commit is contained in:
parent
75dd070b3d
commit
50eba49547
@ -63,9 +63,8 @@ func IsMd5(hash string) bool {
|
||||
}
|
||||
|
||||
func CheckPasswordBcrypt(user *models.User, password, salt string) bool {
|
||||
hashedPassword := []byte(strings.TrimSpace(user.Password))
|
||||
plainPassword := []byte(strings.TrimSpace(password) + salt)
|
||||
err := bcrypt.CompareHashAndPassword(hashedPassword, plainPassword)
|
||||
err := bcrypt.CompareHashAndPassword([]byte(user.Password), plainPassword)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
1.5.2
|
||||
1.5.3
|
Loading…
Reference in New Issue
Block a user