mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Closes #5542 Duplicate cookies
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7735 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
aa248a126f
commit
3c50e54213
1 changed files with 15 additions and 13 deletions
|
@ -608,21 +608,23 @@ class CakeSession extends Object {
|
|||
if (isset($_COOKIE[session_name()])) {
|
||||
setcookie(Configure::read('Session.cookie'), '', time() - 42000, $this->path);
|
||||
}
|
||||
session_regenerate_id();
|
||||
$newSessid = session_id();
|
||||
session_regenerate_id(true);
|
||||
if (PHP_VERSION < 5.1) {
|
||||
$newSessid = session_id();
|
||||
|
||||
if (function_exists('session_write_close')) {
|
||||
session_write_close();
|
||||
if (function_exists('session_write_close')) {
|
||||
session_write_close();
|
||||
}
|
||||
$this->__initSession();
|
||||
session_id($oldSessionId);
|
||||
session_start();
|
||||
session_destroy();
|
||||
$file = $sessionpath . DS . "sess_$oldSessionId";
|
||||
@unlink($file);
|
||||
$this->__initSession();
|
||||
session_id($newSessid);
|
||||
session_start();
|
||||
}
|
||||
$this->__initSession();
|
||||
session_id($oldSessionId);
|
||||
session_start();
|
||||
session_destroy();
|
||||
$file = $sessionpath . DS . "sess_$oldSessionId";
|
||||
@unlink($file);
|
||||
$this->__initSession();
|
||||
session_id($newSessid);
|
||||
session_start();
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue