summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorGDmac <grdalenoort@gmail.com>2012-10-16 15:01:14 +0200
committerGDmac <grdalenoort@gmail.com>2012-10-16 15:01:14 +0200
commit28616da32bcf72f37c0e61e304a1799b90ceec3f (patch)
treed4726159e2b451b06a305aa4096a2d32f461178e /system/libraries
parent19cd88799f27bef8d502250c86eddcd72789bdb3 (diff)
Native PHP Session, don't regenerate session_id during ajax
Signed-off-by: GDmac <grdalenoort@gmail.com>
Diffstat (limited to 'system/libraries')
-rwxr-xr-xsystem/libraries/Session/drivers/Session_native.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/system/libraries/Session/drivers/Session_native.php b/system/libraries/Session/drivers/Session_native.php
index d7b9e8410..fb3b638a0 100755
--- a/system/libraries/Session/drivers/Session_native.php
+++ b/system/libraries/Session/drivers/Session_native.php
@@ -155,8 +155,12 @@ class CI_Session_native extends CI_Session_driver {
if ($config['sess_time_to_update'] && isset($_SESSION['last_activity'])
&& ($_SESSION['last_activity'] + $config['sess_time_to_update']) < $now)
{
- // Regenerate ID, but don't destroy session
- $this->sess_regenerate(FALSE);
+ // Changing the session ID amidst a series of AJAX calls causes problems
+ if( ! $this->CI->input->is_ajax_request())
+ {
+ // Regenerate ID, but don't destroy session
+ $this->sess_regenerate(FALSE);
+ }
}
// Set activity time