mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-10 03:03:44 +08:00
fix: 修复日志记录时明文显示密码的问题
This commit is contained in:
@@ -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, "******")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 当前登录用户
|
||||
|
||||
Reference in New Issue
Block a user