Merge branch 'main' into feature/bots

This commit is contained in:
Jason Song
2022-11-29 11:09:20 +08:00
committed by GitHub
10 changed files with 36 additions and 31 deletions

View File

@ -401,7 +401,7 @@ func hashPassword(passwd, salt, algo string) (string, error) {
tempPasswd = pbkdf2.Key([]byte(passwd), saltBytes, 10000, 50, sha256.New)
}
return fmt.Sprintf("%x", tempPasswd), nil
return hex.EncodeToString(tempPasswd), nil
}
// SetPassword hashes a password using the algorithm defined in the config value of PASSWORD_HASH_ALGO