不在界面上显示SSH认证的密码,提升安全性

This commit is contained in:
GoEdgeLab
2021-03-28 16:21:46 +08:00
parent 55a92b05c4
commit 2ce09a8b0c

View File

@@ -5,6 +5,7 @@ import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/clusters/grants/grantutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/iwind/TeaGo/maps"
"strings"
)
type GrantAction struct {
@@ -37,7 +38,7 @@ func (this *GrantAction) RunGet(params struct {
"method": grant.Method,
"methodName": grantutils.FindGrantMethodName(grant.Method),
"username": grant.Username,
"password": grant.Password,
"password": strings.Repeat("*", len(grant.Password)),
"privateKey": grant.PrivateKey,
"description": grant.Description,
"su": grant.Su,