From 5228a5558f0ee9af785f1b4cdcef4d97b17b33f6 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 11 Mar 2011 03:55:20 -0500
Subject: [PATCH] - Applied fixes from trunk
---
program/include/rcube_session.php | 23 ++++-------------------
1 files changed, 4 insertions(+), 19 deletions(-)
diff --git a/program/include/rcube_session.php b/program/include/rcube_session.php
index 59ce423..0bae4a7 100644
--- a/program/include/rcube_session.php
+++ b/program/include/rcube_session.php
@@ -183,27 +183,12 @@
}
- public function regenerate_id()
+ public function regenerate_id($destroy=true)
{
- $randval = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ session_regenerate_id($destroy);
- for ($random = '', $i=1; $i <= 32; $i++) {
- $random .= substr($randval, mt_rand(0,(strlen($randval) - 1)), 1);
- }
-
- // use md5 value for id or remove capitals from string $randval
- $random = md5($random);
-
- // delete old session record
- $this->destroy(session_id());
-
- session_id($random);
-
- $cookie = session_get_cookie_params();
- $lifetime = $cookie['lifetime'] ? time() + $cookie['lifetime'] : 0;
-
- rcmail::setcookie(session_name(), $random, $lifetime);
-
+ $this->vars = false;
+ $this->key = session_id();
return true;
}
--
Gitblit v1.9.1