Add PasswordSalt to org.

This commit is contained in:
Yang Luo
2021-05-05 23:40:18 +08:00
parent f442f11568
commit 8a4311c85c
10 changed files with 28 additions and 21 deletions

View File

@ -65,7 +65,7 @@ func checkPassword(user *User, password string) string {
return "password incorrect"
}
} else if organization.PasswordType == "salt" {
if getSaltedPassword(password) == user.Password {
if getSaltedPassword(password, organization.PasswordSalt) == user.Password {
return ""
} else {
return "password incorrect"