From e5f64c83fd0fb4826bc88d3ebcb9d17585fa8059 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 4 Jan 2024 16:54:55 +0800 Subject: [PATCH] * Check account first, then add single quotes. --- config/filter.php | 1 + framework/base/router.class.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/filter.php b/config/filter.php index 9ea8199719..1b84357015 100755 --- a/config/filter.php +++ b/config/filter.php @@ -35,6 +35,7 @@ $filter->default->cookie['maxImport'] = 'reg::any'; $filter->default->cookie['za'] = 'reg::any'; $filter->default->cookie['zp'] = 'reg::any'; $filter->default->cookie['historyOrder'] = 'reg::word'; +$filter->default->cookie['vision'] = 'reg::word'; $filter->index = new stdclass(); $filter->my = new stdclass(); diff --git a/framework/base/router.class.php b/framework/base/router.class.php index cf4aed2ebc..b38f4a4ebd 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -812,9 +812,10 @@ class baseRouter $vision = ''; $sql = new sql(); - $account = $sql->quote($account); if($this->config->installed and validater::checkAccount($account)) { + $account = $sql->quote($account); + if(!empty($_COOKIE['vision'])) { $vision = $_COOKIE['vision'];