From e4bf021203afe6643da0678ee2c5200ccdcb6857 Mon Sep 17 00:00:00 2001 From: xiaochong0302 Date: Tue, 22 Sep 2020 16:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96demo=E5=88=86=E6=94=AF?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=A7=81=E5=AF=86=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Admin/Services/Setting.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Admin/Services/Setting.php b/app/Http/Admin/Services/Setting.php index f2b60ed7..65e5f1ba 100644 --- a/app/Http/Admin/Services/Setting.php +++ b/app/Http/Admin/Services/Setting.php @@ -62,8 +62,9 @@ class Setting extends Service */ if ($items->count() > 0) { foreach ($items as $item) { - $pattern = '/(id|auth|key|secret|pwd|pass)/'; - if (preg_match($pattern, $item->item_key)) { + $case1 = preg_match('/(id|auth|key|secret|pass|pwd)/', $item->item_key); + $case2 = $this->dispatcher->getControllerName() == 'setting'; + if ($case1 && $case2) { $item->item_value = '***'; } $result[$item->item_key] = $item->item_value;