Fixed bug that salt was not used for password hashing, introduced in ab4edaff94

This commit is contained in:
Marc Ole Bulling
2021-04-07 22:23:41 +02:00
parent 4a85b4162f
commit 70cfe7997a

View File

@@ -322,9 +322,9 @@ func HashPassword(password string, useFileSalt bool) string {
if password == "" {
return ""
}
salt := Environment.SaltAdmin
salt := ServerSettings.SaltAdmin
if useFileSalt {
salt = Environment.SaltFiles
salt = ServerSettings.SaltFiles
}
bytes := []byte(password + salt)
hash := sha1.New()