mirror of
https://github.com/Forceu/Gokapi.git
synced 2026-03-13 13:39:02 -05:00
Fixed bug that salt was not used for password hashing, introduced in ab4edaff94
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user