fix: 修复日志记录时明文显示密码的问题

This commit is contained in:
hailaz 2025-01-08 21:25:31 +08:00
parent 2fd3854aeb
commit b48079bbdc

View File

@ -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, "******")
}
}
}
// 当前登录用户