1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 20:06:09 +08:00

摘除demo分支错误的合并

This commit is contained in:
xiaochong0302 2020-12-11 20:53:54 +08:00
parent 3eb2216dac
commit 3f058c3e45
3 changed files with 0 additions and 25 deletions

View File

@ -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();

View File

@ -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;
}
}

View File

@ -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 %}
</body>
</html>