From b8330d614068da2f1a5cf5cb762403bacd1632e5 Mon Sep 17 00:00:00 2001 From: zhuxbo Date: Tue, 18 Oct 2022 06:56:44 +0000 Subject: [PATCH] =?UTF-8?q?fix:=E6=95=8F=E6=84=9F=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E8=AE=B0=E5=BD=95=20password=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=97=B6=E7=9A=84=E8=84=B1=E6=95=8F=E5=A4=84=E7=90=86?= =?UTF-8?q?=20!60?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/event/Security.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/common/event/Security.php b/app/common/event/Security.php index 60987187..327c4dde 100644 --- a/app/common/event/Security.php +++ b/app/common/event/Security.php @@ -98,6 +98,11 @@ class Security continue; } + // 如果字段名中包含 password 且修改值不为空,则设置密码记录为 ****** + if (stripos('password', $field) !== false && $newData[$field] !== '') { + $newData[$field] = "******"; + } + $sensitiveDataLog[] = [ 'admin_id' => $adminId, 'sensitive_id' => $sensitiveData['id'],