|
@@ -365,8 +365,7 @@ function sqsession_start() {
|
|
|
|
|
|
// session_starts sets the sessionid cookie buth without the httponly var
|
|
// session_starts sets the sessionid cookie buth without the httponly var
|
|
// setting the cookie again sets the httponly cookie attribute
|
|
// setting the cookie again sets the httponly cookie attribute
|
|
-
|
|
|
|
- sqsetcookie(session_name(),session_id(),false,$base_uri);
|
|
|
|
|
|
+ sqsetcookie(session_name(),$session_id,false,$base_uri);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -381,7 +380,7 @@ function sqsession_start() {
|
|
* @param boolean $bHttpOnly Disallow JS to access the cookie (IE6 only)
|
|
* @param boolean $bHttpOnly Disallow JS to access the cookie (IE6 only)
|
|
* @return void
|
|
* @return void
|
|
*/
|
|
*/
|
|
-function sqsetcookie($sName,$sValue="",$iExpire=0,$sPath="",$sDomain="",$bSecure=false,$bHttpOnly=true) {
|
|
|
|
|
|
+function sqsetcookie($sName,$sValue="deleted",$iExpire=0,$sPath="",$sDomain="",$bSecure=false,$bHttpOnly=true) {
|
|
// if we have a secure connection then limit the cookies to https only.
|
|
// if we have a secure connection then limit the cookies to https only.
|
|
if ($sName && isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {
|
|
if ($sName && isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {
|
|
$bSecure = true;
|
|
$bSecure = true;
|
|
@@ -400,7 +399,7 @@ function sqsetcookie($sName,$sValue="",$iExpire=0,$sPath="",$sDomain="",$bSecure
|
|
$Port = strpos($Domain, ':');
|
|
$Port = strpos($Domain, ':');
|
|
if ($Port !== false) $Domain = substr($Domain, 0, $Port);
|
|
if ($Port !== false) $Domain = substr($Domain, 0, $Port);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if (!$sValue) $sValue = 'deleted';
|
|
header('Set-Cookie: ' . rawurlencode($sName) . '=' . rawurlencode($sValue)
|
|
header('Set-Cookie: ' . rawurlencode($sName) . '=' . rawurlencode($sValue)
|
|
. (empty($iExpires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s', $iExpires) . ' GMT')
|
|
. (empty($iExpires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s', $iExpires) . ' GMT')
|
|
. (empty($sPath) ? '' : '; path=' . $sPath)
|
|
. (empty($sPath) ? '' : '; path=' . $sPath)
|