Реализован production-hardening по fix1: env/reconfigure, IPv4-only, TLS, secrets, firewall, docs
This commit is contained in:
+6
-3
@@ -36,8 +36,12 @@ func runReset(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
if err = dao.UpdateAccount([]int64{1}, map[string]interface{}{
|
||||
"username": username,
|
||||
"pass": util.SHA224String(password),
|
||||
"con_pass": fmt.Sprintf("%s.%s", username, password)}); err != nil {
|
||||
"pass": func() string {
|
||||
hash, _ := util.HashPassword(password)
|
||||
return hash
|
||||
}(),
|
||||
"force_password_change": 1,
|
||||
"con_pass": fmt.Sprintf("%s.%s", username, password)}); err != nil {
|
||||
fmt.Println(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -49,4 +53,3 @@ func runReset(cmd *cobra.Command, args []string) {
|
||||
fmt.Println(fmt.Sprintf("HY2XS admin Login Password: %s", password))
|
||||
fmt.Println(fmt.Sprintf("HY2XS admin Connection Password: %s", fmt.Sprintf("%s.%s", username, password)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user