mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-08-10 00:11:38 +08:00
优化demo分支过滤私密配置
This commit is contained in:
parent
3187f04b35
commit
e4bf021203
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user