From bad6bbd39c46014d42aca31b65a40b849ad1fc9f Mon Sep 17 00:00:00 2001 From: guanxiying Date: Thu, 21 Nov 2019 14:20:11 +0800 Subject: [PATCH] * Add httpOnly param when setcooki. --- module/bug/control.php | 12 +++++----- module/caselib/control.php | 6 ++--- module/caselib/model.php | 2 +- module/doc/control.php | 8 +++---- module/doc/model.php | 2 +- module/extension/model.php | 2 +- module/git/model.php | 2 +- module/product/control.php | 10 ++++----- module/product/model.php | 4 ++-- module/project/control.php | 44 ++++++++++++++++++------------------- module/project/model.php | 2 +- module/story/control.php | 2 +- module/svn/model.php | 2 +- module/task/control.php | 2 +- module/testcase/control.php | 12 +++++----- module/testsuite/model.php | 2 +- module/testtask/control.php | 6 ++--- module/user/control.php | 2 +- 18 files changed, 61 insertions(+), 61 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 7d6ae127cb..22b69afad8 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -77,15 +77,15 @@ class bug extends control /* Set productID, moduleID, queryID and branch. */ $productID = $this->product->saveState($productID, $this->products); $branch = ($branch == '') ? (int)$this->cookie->preBranch : (int)$branch; - setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot); - setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot); + setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true); + setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true); if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch) { $_COOKIE['bugModule'] = 0; - setcookie('bugModule', 0, 0, $this->config->webRoot); + setcookie('bugModule', 0, 0, $this->config->webRoot, '', false, true); } - if($browseType == 'bymodule') setcookie('bugModule', (int)$param, 0, $this->config->webRoot); + if($browseType == 'bymodule') setcookie('bugModule', (int)$param, 0, $this->config->webRoot, '', false, true); if($browseType != 'bymodule') $this->session->set('bugBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->bugModule ? $this->cookie->bugModule : 0)); @@ -97,7 +97,7 @@ class bug extends control /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->qaBugOrder ? $this->cookie->qaBugOrder : 'id_desc'; - setcookie('qaBugOrder', $orderBy, 0, $this->config->webRoot); + setcookie('qaBugOrder', $orderBy, 0, $this->config->webRoot, '', false, true); /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); @@ -299,7 +299,7 @@ class bug extends control if(defined('RUN_MODE') && RUN_MODE == 'api') $this->send(array('status' => 'success', 'data' => $bugID)); - setcookie('bugModule', (int)$this->post->module, 0, $this->config->webRoot); + setcookie('bugModule', (int)$this->post->module, 0, $this->config->webRoot, '', false, true); $location = $this->createLink('bug', 'browse', "productID={$this->post->product}&branch=$branch&browseType=unclosed¶m=0&orderBy=id_desc"); if($this->app->getViewType() == 'xhtml') $location = $this->createLink('bug', 'view', "bugID=$bugID"); $response['locate'] = $location; diff --git a/module/caselib/control.php b/module/caselib/control.php index 66df1bd5b6..effa982673 100644 --- a/module/caselib/control.php +++ b/module/caselib/control.php @@ -171,14 +171,14 @@ class caselib extends control /* Set menu. */ $libID = $this->caselib->saveLibState($libID, $libraries); - setcookie('preCaseLibID', $libID, $this->config->cookieLife, $this->config->webRoot); + setcookie('preCaseLibID', $libID, $this->config->cookieLife, $this->config->webRoot, '', false, true); if($this->cookie->preCaseLibID != $libID) { $_COOKIE['libCaseModule'] = 0; - setcookie('libCaseModule', 0, 0, $this->config->webRoot); + setcookie('libCaseModule', 0, 0, $this->config->webRoot, '', false, true); } - if($browseType == 'bymodule') setcookie('libCaseModule', (int)$param, 0, $this->config->webRoot); + if($browseType == 'bymodule') setcookie('libCaseModule', (int)$param, 0, $this->config->webRoot, '', false, true); if($browseType != 'bymodule') $this->session->set('libBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->libCaseModule ? $this->cookie->libCaseModule : 0)); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; diff --git a/module/caselib/model.php b/module/caselib/model.php index 0662860ef7..292839d45d 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -59,7 +59,7 @@ class caselibModel extends model } } - setCookie("lastCaseLib", $libID, $this->config->cookieLife, $this->config->webRoot); + setCookie("lastCaseLib", $libID, $this->config->cookieLife, $this->config->webRoot, '', false, true); $pageNav = ''; $pageActions = ''; diff --git a/module/doc/control.php b/module/doc/control.php index b5ee89687a..152704ea69 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -78,7 +78,7 @@ class doc extends control public function browse($libID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $from = 'doc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { $this->from = $from; - setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot); + setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true); $this->loadModel('search'); @@ -656,7 +656,7 @@ class doc extends control */ public function allLibs($type, $product = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { - setcookie('product', $product, $this->config->cookieLife, $this->config->webRoot); + setcookie('product', $product, $this->config->cookieLife, $this->config->webRoot, '', false, true); $libName = $this->lang->doc->libTypeList[$type]; $crumb = html::a(inlink('allLibs', "type=$type&product=$product"), $libName); @@ -707,7 +707,7 @@ class doc extends control $this->app->session->set('docList', $uri); if(empty($viewType)) $viewType = !empty($_COOKIE['docFilesViewType']) ? $this->cookie->docFilesViewType : 'card'; - setcookie('docFilesViewType', $viewType, $this->config->cookieLife, $this->config->webRoot); + setcookie('docFilesViewType', $viewType, $this->config->cookieLife, $this->config->webRoot, '', false, true); $table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT; $object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch(); @@ -798,7 +798,7 @@ class doc extends control public function objectLibs($type, $objectID, $from = 'doc') { $this->from = $from; - setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot); + setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true); $table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT; $object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch(); diff --git a/module/doc/model.php b/module/doc/model.php index 24c76422e7..5602f9e783 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1500,7 +1500,7 @@ class docModel extends model $projectProduct = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('product')->eq($productID)->andWhere('project')->eq($projectID)->fetch(); if(empty($projectProduct)) { - setcookie('product', 0, $this->config->cookieLife, $this->config->webRoot); + setcookie('product', 0, $this->config->cookieLife, $this->config->webRoot, '', false, true); return html::a(helper::createLink('doc', 'allLibs', "type=project"), $this->lang->projectCommon) . $this->lang->doc->separator; } } diff --git a/module/extension/model.php b/module/extension/model.php index 56c5175a5e..926dd2c53a 100644 --- a/module/extension/model.php +++ b/module/extension/model.php @@ -90,7 +90,7 @@ class extensionModel extends model public function getModulesByAPI() { $requestType = $this->config->requestType; - $webRoot = helper::safe64Encode($this->config->webRoot); + $webRoot = helper::safe64Encode($this->config->webRoot, '', false, true); $apiURL = $this->apiRoot . 'apiGetmodules-' . $requestType . '-' . $webRoot . '.json'; $data = $this->fetchAPI($apiURL); if(isset($data->modules)) return $data->modules; diff --git a/module/git/model.php b/module/git/model.php index 3ac2d00fbf..844f2724ac 100644 --- a/module/git/model.php +++ b/module/git/model.php @@ -641,7 +641,7 @@ class gitModel extends model $diff = ''; $oldSelf = $this->server->PHP_SELF; - $this->server->set('PHP_SELF', $this->config->webRoot); + $this->server->set('PHP_SELF', $this->config->webRoot, '', false, true); if(!$repoRoot) $repoRoot = $this->repoRoot; diff --git a/module/product/control.php b/module/product/control.php index 979206e23a..d870ab12ac 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -115,15 +115,15 @@ class product extends control /* Set product, module and query. */ $productID = $this->product->saveState($productID, $this->products); $branch = ($branch === '') ? (int)$this->cookie->preBranch : (int)$branch; - setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot); - setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot); + setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true); + setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true); if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch) { $_COOKIE['storyModule'] = 0; - setcookie('storyModule', 0, 0, $this->config->webRoot); + setcookie('storyModule', 0, 0, $this->config->webRoot, '', false, true); } - if($browseType == 'bymodule') setcookie('storyModule', (int)$param, 0, $this->config->webRoot); + if($browseType == 'bymodule') setcookie('storyModule', (int)$param, 0, $this->config->webRoot, '', false, true); if($browseType != 'bymodule') $this->session->set('storyBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->storyModule ? $this->cookie->storyModule : 0)); @@ -134,7 +134,7 @@ class product extends control /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->productStoryOrder ? $this->cookie->productStoryOrder : 'id_desc'; - setcookie('productStoryOrder', $orderBy, 0, $this->config->webRoot); + setcookie('productStoryOrder', $orderBy, 0, $this->config->webRoot, '', false, true); /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); diff --git a/module/product/model.php b/module/product/model.php index c1a706be9a..4441349d6f 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -123,7 +123,7 @@ class productModel extends model } $isMobile = $this->app->viewType == 'mhtml'; - setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot); + setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true); $currentProduct = $this->getById($productID); $this->session->set('currentProductType', $currentProduct->type); @@ -201,7 +201,7 @@ class productModel extends model if($this->cookie->preProductID != $productID) { $this->cookie->set('preBranch', 0); - setcookie('preBranch', 0, $this->config->cookieLife, $this->config->webRoot); + setcookie('preBranch', 0, $this->config->cookieLife, $this->config->webRoot, '', false, true); } return $this->session->product; diff --git a/module/project/control.php b/module/project/control.php index 29e44c3223..7a63c6193d 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -126,23 +126,23 @@ class project extends control $project = $this->commonAction($projectID, $status); $projectID = $project->id; $products = $this->config->global->flow == 'onlyTask' ? array() : $this->loadModel('product')->getProductsByProject($projectID); - setcookie('preProjectID', $projectID, $this->config->cookieLife, $this->config->webRoot); + setcookie('preProjectID', $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true); if($this->cookie->preProjectID != $projectID) { $_COOKIE['moduleBrowseParam'] = $_COOKIE['productBrowseParam'] = 0; - setcookie('moduleBrowseParam', 0, 0, $this->config->webRoot); - setcookie('productBrowseParam', 0, 0, $this->config->webRoot); + setcookie('moduleBrowseParam', 0, 0, $this->config->webRoot, '', false, true); + setcookie('productBrowseParam', 0, 0, $this->config->webRoot, '', false, true); } if($browseType == 'bymodule') { - setcookie('moduleBrowseParam', (int)$param, 0, $this->config->webRoot); - setcookie('productBrowseParam', 0, 0, $this->config->webRoot); + setcookie('moduleBrowseParam', (int)$param, 0, $this->config->webRoot, '', false, true); + setcookie('productBrowseParam', 0, 0, $this->config->webRoot, '', false, true); } elseif($browseType == 'byproduct') { - setcookie('moduleBrowseParam', 0, 0, $this->config->webRoot); - setcookie('productBrowseParam', (int)$param, 0, $this->config->webRoot); + setcookie('moduleBrowseParam', 0, 0, $this->config->webRoot, '', false, true); + setcookie('productBrowseParam', (int)$param, 0, $this->config->webRoot, '', false, true); } else { @@ -162,7 +162,7 @@ class project extends control /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->projectTaskOrder ? $this->cookie->projectTaskOrder : 'status,id_desc'; - setcookie('projectTaskOrder', $orderBy, 0, $this->config->webRoot); + setcookie('projectTaskOrder', $orderBy, 0, $this->config->webRoot, '', false, true); /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); @@ -636,40 +636,40 @@ class project extends control $this->project->getLimitedProject(); $type = strtolower($type); - setcookie('storyPreProjectID', $projectID, $this->config->cookieLife, $this->config->webRoot); + setcookie('storyPreProjectID', $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true); if($this->cookie->storyPreProjectID != $projectID) { $_COOKIE['storyModuleParam'] = $_COOKIE['storyProductParam'] = $_COOKIE['storyBranchParam'] = 0; - setcookie('storyModuleParam', 0, 0, $this->config->webRoot); - setcookie('storyProductParam', 0, 0, $this->config->webRoot); - setcookie('storyBranchParam', 0, 0, $this->config->webRoot); + setcookie('storyModuleParam', 0, 0, $this->config->webRoot, '', false, true); + setcookie('storyProductParam', 0, 0, $this->config->webRoot, '', false, true); + setcookie('storyBranchParam', 0, 0, $this->config->webRoot, '', false, true); } if($type == 'bymodule') { $_COOKIE['storyModuleParam'] = (int)$param; $_COOKIE['storyProductParam'] = 0; $_COOKIE['storyBranchParam'] = 0; - setcookie('storyModuleParam', (int)$param, 0, $this->config->webRoot); - setcookie('storyProductParam', 0, 0, $this->config->webRoot); - setcookie('storyBranchParam', 0, 0, $this->config->webRoot); + setcookie('storyModuleParam', (int)$param, 0, $this->config->webRoot, '', false, true); + setcookie('storyProductParam', 0, 0, $this->config->webRoot, '', false, true); + setcookie('storyBranchParam', 0, 0, $this->config->webRoot, '', false, true); } elseif($type == 'byproduct') { $_COOKIE['storyModuleParam'] = 0; $_COOKIE['storyProductParam'] = (int)$param; $_COOKIE['storyBranchParam'] = 0; - setcookie('storyModuleParam', 0, 0, $this->config->webRoot); - setcookie('storyProductParam', (int)$param, 0, $this->config->webRoot); - setcookie('storyBranchParam', 0, 0, $this->config->webRoot); + setcookie('storyModuleParam', 0, 0, $this->config->webRoot, '', false, true); + setcookie('storyProductParam', (int)$param, 0, $this->config->webRoot, '', false, true); + setcookie('storyBranchParam', 0, 0, $this->config->webRoot, '', false, true); } elseif($type == 'bybranch') { $_COOKIE['storyModuleParam'] = 0; $_COOKIE['storyProductParam'] = 0; $_COOKIE['storyBranchParam'] = $param; - setcookie('storyModuleParam', 0, 0, $this->config->webRoot); - setcookie('storyProductParam', 0, 0, $this->config->webRoot); - setcookie('storyBranchParam', $param, 0, $this->config->webRoot); + setcookie('storyModuleParam', 0, 0, $this->config->webRoot, '', false, true); + setcookie('storyProductParam', 0, 0, $this->config->webRoot, '', false, true); + setcookie('storyBranchParam', $param, 0, $this->config->webRoot, '', false, true); } else { @@ -681,7 +681,7 @@ class project extends control /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->projectStoryOrder ? $this->cookie->projectStoryOrder : 'pri'; - setcookie('projectStoryOrder', $orderBy, 0, $this->config->webRoot); + setcookie('projectStoryOrder', $orderBy, 0, $this->config->webRoot, '', false, true); /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); diff --git a/module/project/model.php b/module/project/model.php index 3f84159446..9bb742bc5b 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -160,7 +160,7 @@ class projectModel extends model $isMobile = $this->app->viewType == 'mhtml'; - setCookie("lastProject", $projectID, $this->config->cookieLife, $this->config->webRoot); + setCookie("lastProject", $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true); $currentProject = $this->getById($projectID); $dropMenuLink = helper::createLink('project', 'ajaxGetDropMenu', "objectID=$projectID&module=$currentModule&method=$currentMethod&extra=$extra"); diff --git a/module/story/control.php b/module/story/control.php index 3b2647eeb8..961778da79 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -126,7 +126,7 @@ class story extends control $response['locate'] = $this->createLink('project', 'story', "projectID=$projectID&orderBy=&browseType=byModule&moduleID=$moduleID"); if($projectID == 0) { - setcookie('storyModule', (int)$moduleID, 0, $this->config->webRoot); + setcookie('storyModule', (int)$moduleID, 0, $this->config->webRoot, '', false, true); $productID = $this->post->product ? $this->post->product : $productID; $branchID = $this->post->branch ? $this->post->branch : $branch; $response['locate'] = $this->createLink('product', 'browse', "productID=$productID&branch=$branchID&browseType=unclosed¶m=0&orderBy=id_desc"); diff --git a/module/svn/model.php b/module/svn/model.php index 0541b526b6..3e3dd0a419 100644 --- a/module/svn/model.php +++ b/module/svn/model.php @@ -603,7 +603,7 @@ class svnModel extends model $diff = ''; $oldSelf = $this->server->PHP_SELF; - $this->server->set('PHP_SELF', $this->config->webRoot); + $this->server->set('PHP_SELF', $this->config->webRoot, '', false, true); if(!$repoRoot) $repoRoot = $this->repoRoot; diff --git a/module/task/control.php b/module/task/control.php index 93f32d05d7..dc46171491 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -155,7 +155,7 @@ class task extends control } elseif($this->post->after == 'toTaskList') { - setcookie('moduleBrowseParam', (int)$this->post->module, 0, $this->config->webRoot); + setcookie('moduleBrowseParam', (int)$this->post->module, 0, $this->config->webRoot, '', false, true); $taskLink = $this->createLink('project', 'task', "projectID=$projectID&status=unclosed¶m=0&orderBy=id_desc"); $response['locate'] = $taskLink; $this->send($response); diff --git a/module/testcase/control.php b/module/testcase/control.php index 0c133879eb..3f96343401 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -63,16 +63,16 @@ class testcase extends control /* Set browseType, productID, moduleID and queryID. */ $productID = $this->product->saveState($productID, $this->products); $branch = ($branch === '') ? (int)$this->cookie->preBranch : (int)$branch; - setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot); - setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot); + setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true); + setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', false, true); if($this->cookie->preProductID != $productID or $this->cookie->preBranch != $branch) { $_COOKIE['caseModule'] = 0; - setcookie('caseModule', 0, 0, $this->config->webRoot); + setcookie('caseModule', 0, 0, $this->config->webRoot, '', false, true); } - if($browseType == 'bymodule') setcookie('caseModule', (int)$param, 0, $this->config->webRoot); - if($browseType == 'bysuite') setcookie('caseSuite', (int)$param, 0, $this->config->webRoot); + if($browseType == 'bymodule') setcookie('caseModule', (int)$param, 0, $this->config->webRoot, '', false, true); + if($browseType == 'bysuite') setcookie('caseSuite', (int)$param, 0, $this->config->webRoot, '', false, true); if($browseType != 'bymodule') $this->session->set('caseBrowseType', $browseType); $moduleID = ($browseType == 'bymodule') ? (int)$param : ($browseType == 'bysearch' ? 0 : ($this->cookie->caseModule ? $this->cookie->caseModule : 0)); @@ -243,7 +243,7 @@ class testcase extends control /* If link from no head then reload. */ if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true)); - setcookie('caseModule', (int)$this->post->module, 0, $this->config->webRoot); + setcookie('caseModule', (int)$this->post->module, 0, $this->config->webRoot, '', false, true); $response['locate'] = $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}&browseType=all¶m=0&orderBy=id_desc"); $this->send($response); } diff --git a/module/testsuite/model.php b/module/testsuite/model.php index 1c17664957..87a5515a2d 100644 --- a/module/testsuite/model.php +++ b/module/testsuite/model.php @@ -81,7 +81,7 @@ class testsuiteModel extends model return; } - setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot); + setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true); $currentProduct = $this->product->getById($productID); $dropMenuLink = helper::createLink('product', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra"); diff --git a/module/testtask/control.php b/module/testtask/control.php index 179afa34b9..0f7e357c59 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -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)); diff --git a/module/user/control.php b/module/user/control.php index 36c6b24532..ff8688eb37 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -829,7 +829,7 @@ class user extends control } $this->app->loadLang('misc'); - $this->view->noGDLib = sprintf($this->lang->misc->noGDLib, common::getSysURL() . $this->config->webRoot); + $this->view->noGDLib = sprintf($this->lang->misc->noGDLib, common::getSysURL() . $this->config->webRoot, '', false, true); $this->view->title = $this->lang->user->login; $this->view->referer = $this->referer; $this->view->s = zget($this->config->global, 'sn', '');