diff --git a/server/internal/logic/sys/log.go b/server/internal/logic/sys/log.go index eb01e48..2288df4 100644 --- a/server/internal/logic/sys/log.go +++ b/server/internal/logic/sys/log.go @@ -206,6 +206,13 @@ func (s *sSysLog) AnalysisLog(ctx context.Context) entity.SysLog { if postData.IsNil() || len(postData.Map()) == 0 { postData = gjson.New(consts.NilJsonToString) + } else { + // 隐藏明文显示的密码 + for k := range postData.Map() { + if gstr.ContainsI(k, "password") { + postData.MustSet(k, "******") + } + } } // 当前登录用户