* Add httpOnly param when setcooki.

This commit is contained in:
guanxiying
2019-11-21 14:20:11 +08:00
parent 9e46b973ad
commit bad6bbd39c
18 changed files with 61 additions and 61 deletions
+3 -3
View File
@@ -264,14 +264,14 @@ class testtask extends control
if(!$task) die(js::error($this->lang->testtask->checkLinked) . js::locate('back'));
$productID = $task->product;
$this->testtask->setMenu($this->products, $productID, $task->branch, $taskID);
setcookie('preTaskID', $taskID, $this->config->cookieLife, $this->config->webRoot);
setcookie('preTaskID', $taskID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
if($this->cookie->preTaskID != $taskID)
{
$_COOKIE['taskCaseModule'] = 0;
setcookie('taskCaseModule', 0, 0, $this->config->webRoot);
setcookie('taskCaseModule', 0, 0, $this->config->webRoot, '', false, true);
}
if($browseType == 'bymodule') setcookie('taskCaseModule', (int)$param, 0, $this->config->webRoot);
if($browseType == 'bymodule') setcookie('taskCaseModule', (int)$param, 0, $this->config->webRoot, '', false, true);
if($browseType != 'bymodule') $this->session->set('taskCaseBrowseType', $browseType);
$moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->taskCaseModule ? $this->cookie->taskCaseModule : 0));