diff options
author | GDmac <grdalenoort@gmail.com> | 2012-10-16 15:01:14 +0200 |
---|---|---|
committer | GDmac <grdalenoort@gmail.com> | 2012-10-16 15:01:14 +0200 |
commit | 28616da32bcf72f37c0e61e304a1799b90ceec3f (patch) | |
tree | d4726159e2b451b06a305aa4096a2d32f461178e /system/libraries | |
parent | 19cd88799f27bef8d502250c86eddcd72789bdb3 (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-x | system/libraries/Session/drivers/Session_native.php | 8 |
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 |