From 3f058c3e4545fd817e53bc7485438c797966ba93 Mon Sep 17 00:00:00 2001 From: xiaochong0302 Date: Fri, 11 Dec 2020 20:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=91=98=E9=99=A4demo=E5=88=86=E6=94=AF?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Admin/Controllers/Controller.php | 11 ----------- app/Http/Admin/Services/Setting.php | 8 -------- app/Http/Admin/Views/templates/main.volt | 6 ------ 3 files changed, 25 deletions(-) diff --git a/app/Http/Admin/Controllers/Controller.php b/app/Http/Admin/Controllers/Controller.php index 25899d50..058bfa77 100644 --- a/app/Http/Admin/Controllers/Controller.php +++ b/app/Http/Admin/Controllers/Controller.php @@ -21,17 +21,6 @@ class Controller extends \Phalcon\Mvc\Controller public function beforeExecuteRoute(Dispatcher $dispatcher) { - /** - * demo分支拒绝数据提交 - */ - if ($this->isNotSafeRequest()) { - $dispatcher->forward([ - 'controller' => 'public', - 'action' => 'forbidden', - ]); - return false; - } - if ($this->isNotSafeRequest()) { $this->checkHttpReferer(); $this->checkCsrfToken(); diff --git a/app/Http/Admin/Services/Setting.php b/app/Http/Admin/Services/Setting.php index d6d46164..3d2130fd 100644 --- a/app/Http/Admin/Services/Setting.php +++ b/app/Http/Admin/Services/Setting.php @@ -87,16 +87,8 @@ class Setting extends Service $result = []; - /** - * demo分支过滤敏感数据 - */ if ($items->count() > 0) { foreach ($items as $item) { - $case1 = preg_match('/(id|auth|key|secret|password|pwd)$/', $item->item_key); - $case2 = $this->dispatcher->getControllerName() == 'setting'; - if ($case1 && $case2) { - $item->item_value = '***'; - } $result[$item->item_key] = $item->item_value; } } diff --git a/app/Http/Admin/Views/templates/main.volt b/app/Http/Admin/Views/templates/main.volt index 8803b2a0..6b70ff60 100644 --- a/app/Http/Admin/Views/templates/main.volt +++ b/app/Http/Admin/Views/templates/main.volt @@ -23,11 +23,5 @@ {% block include_js %}{% endblock %} {% block inline_js %}{% endblock %} -{% set site = setting('site') %} - -{% if site['analytics_enabled'] == 1 %} - {{ site['analytics_script'] }} -{% endif %} - \ No newline at end of file