From 230dcd7dd720cf6c40a06476e0b88694b5e9261f Mon Sep 17 00:00:00 2001 From: guanxiying Date: Thu, 21 Nov 2019 13:30:49 +0800 Subject: [PATCH] * Setcookie with httpOnly param. --- module/user/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/user/model.php b/module/user/model.php index 2b4e4ea7b6..3b833be00e 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -819,9 +819,9 @@ class userModel extends model */ public function keepLogin($user) { - setcookie('keepLogin', 'on', $this->config->cookieLife, $this->config->webRoot); - setcookie('za', $user->account, $this->config->cookieLife, $this->config->webRoot); - setcookie('zp', sha1($user->account . $user->password . $this->server->request_time), $this->config->cookieLife, $this->config->webRoot); + setcookie('keepLogin', 'on', $this->config->cookieLife, $this->config->webRoot, '', false, true); + setcookie('za', $user->account, $this->config->cookieLife, $this->config->webRoot, '', false, true); + setcookie('zp', sha1($user->account . $user->password . $this->server->request_time), $this->config->cookieLife, $this->config->webRoot, '', false, true); } /**