From 7ebd4b4ec4146a7522137ce15a2b19264b8fe10d Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Mon, 15 Mar 2010 21:35:23 +0000 Subject: [PATCH] Fixed issue #4199: Cookie path not set git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8488 b72ed6b6-b9f8-46b5-92b4-906544132732 --- admin/classes/phpCAS/CAS/client.php | 8 ++++---- .../editor/filemanager/connectors/php/config.php | 1 + admin/sessioncontrol.php | 1 + index.php | 1 + printanswers.php | 1 + register.php | 1 + verification.php | 1 + 7 files changed, 10 insertions(+), 4 deletions(-) diff --git a/admin/classes/phpCAS/CAS/client.php b/admin/classes/phpCAS/CAS/client.php index bfea59052df..caef131f452 100644 --- a/admin/classes/phpCAS/CAS/client.php +++ b/admin/classes/phpCAS/CAS/client.php @@ -512,8 +512,8 @@ function CASClient( session_start(); } // restore old session vars - $_SESSION = $old_session; - // Redirect to location without ticket. + $_SESSION = $old_session; + // Redirect to location without ticket. header('Location: '.$this->getURL()); } @@ -1585,7 +1585,7 @@ function setPGTStorageFile($format='', } // create the storage object - $this->_pgt_storage = &new PGTStorageFile($this,$format,$path); + $this->_pgt_storage = new PGTStorageFile($this,$format,$path); } /** @@ -1622,7 +1622,7 @@ function setPGTStorageDB($user, trigger_error('PGT storage into database is an experimental feature, use at your own risk',E_USER_WARNING); // create the storage object - $this->_pgt_storage = & new PGTStorageDB($this,$user,$password,$database_type,$hostname,$port,$database,$table); + $this->_pgt_storage = new PGTStorageDB($this,$user,$password,$database_type,$hostname,$port,$database,$table); } // ######################################################################## diff --git a/admin/scripts/fckeditor.266/editor/filemanager/connectors/php/config.php b/admin/scripts/fckeditor.266/editor/filemanager/connectors/php/config.php index 95d70e81458..1e1ce8ae478 100755 --- a/admin/scripts/fckeditor.266/editor/filemanager/connectors/php/config.php +++ b/admin/scripts/fckeditor.266/editor/filemanager/connectors/php/config.php @@ -41,6 +41,7 @@ session_name("LimeSurveyAdmin"); } +session_set_cookie_params(0,$relativeurl); if (session_id() == "") @session_start(); diff --git a/admin/sessioncontrol.php b/admin/sessioncontrol.php index 849dd843a63..d5c195d6f45 100644 --- a/admin/sessioncontrol.php +++ b/admin/sessioncontrol.php @@ -31,6 +31,7 @@ if (session_id() == "") { + session_set_cookie_params(0,$relativeurl); if ($debug==0) {@session_start();} else {session_start();} } diff --git a/index.php b/index.php index 901e73f16b0..93ff73b46eb 100644 --- a/index.php +++ b/index.php @@ -64,6 +64,7 @@ { session_name("LimeSurveyRuntime-$surveyid"); } +session_set_cookie_params(0,$relativeurl); @session_start(); diff --git a/printanswers.php b/printanswers.php index b788d982155..bde4e8c61f6 100644 --- a/printanswers.php +++ b/printanswers.php @@ -58,6 +58,7 @@ { session_name("LimeSurveyRuntime-$surveyid"); } +session_set_cookie_params(0,$relativeurl); @session_start(); if (isset($_SESSION['sid'])) {$surveyid=$_SESSION['sid'];} else die('Invalid survey/session'); diff --git a/register.php b/register.php index 30d2fbac605..c6063bf8f67 100644 --- a/register.php +++ b/register.php @@ -45,6 +45,7 @@ session_name("LimeSurveyRuntime-$surveyid"); } +session_set_cookie_params(0,$relativeurl); session_start(); // Get passed language from form, so that we dont loose this! diff --git a/verification.php b/verification.php index 1b585cca3c0..2105bb79573 100644 --- a/verification.php +++ b/verification.php @@ -41,6 +41,7 @@ { session_name("LimeSurveyRuntime-$surveyid"); } +session_set_cookie_params(0,$relativeurl); @session_start(); // header for png