From b48079bbdc0959e034cecf6c7fddf48d5aad0c1e Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Wed, 8 Jan 2025 21:25:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=97=B6=E6=98=8E=E6=96=87=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/internal/logic/sys/log.go | 7 +++++++ 1 file changed, 7 insertions(+) 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, "******") + } + } } // 当前登录用户