From 4e481bed19dbb2ed4578c85cc87711e572630a5b Mon Sep 17 00:00:00 2001 From: guanxiying Date: Thu, 21 Nov 2019 13:31:35 +0800 Subject: [PATCH] * Add httpOnly param when setcookie. --- framework/base/router.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 30e89d121b..d64e2b23cd 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -867,7 +867,7 @@ class baseRouter $this->clientLang = $this->config->default->lang; } - setcookie('lang', $this->clientLang, $this->config->cookieLife, $this->config->webRoot); + setcookie('lang', $this->clientLang, $this->config->cookieLife, $this->config->webRoot, '', false, true); if(!isset($_COOKIE['lang'])) $_COOKIE['lang'] = $this->clientLang; return true; @@ -921,7 +921,7 @@ class baseRouter $this->clientTheme = $this->config->default->theme; } - setcookie('theme', $this->clientTheme, $this->config->cookieLife, $this->config->webRoot); + setcookie('theme', $this->clientTheme, $this->config->cookieLife, $this->config->webRoot, '', false, true); if(!isset($_COOKIE['theme'])) $_COOKIE['theme'] = $this->clientTheme; return true; @@ -947,7 +947,7 @@ class baseRouter $this->clientDevice = ($mobile->isMobile() and !$mobile->isTablet()) ? 'mobile' : 'desktop'; } - setcookie('device', $this->clientDevice, $this->config->cookieLife, $this->config->webRoot); + setcookie('device', $this->clientDevice, $this->config->cookieLife, $this->config->webRoot, '', false, true); if(!isset($_COOKIE['device'])) $_COOKIE['device'] = $this->clientDevice; return $this->clientDevice;