summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/drivers/Session_native.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Session/drivers/Session_native.php')
-rw-r--r--system/libraries/Session/drivers/Session_native.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/libraries/Session/drivers/Session_native.php b/system/libraries/Session/drivers/Session_native.php
index fb5ce1906..c237ad059 100644
--- a/system/libraries/Session/drivers/Session_native.php
+++ b/system/libraries/Session/drivers/Session_native.php
@@ -117,18 +117,21 @@ class CI_Session_native extends CI_Session_driver {
if (isset($_SESSION['last_activity']) && (($_SESSION['last_activity'] + $expire) < $now OR $_SESSION['last_activity'] > $now))
{
// Expired - destroy
+ log_message('debug', 'Session: Expired');
$destroy = TRUE;
}
elseif ($config['sess_match_ip'] === TRUE && isset($_SESSION['ip_address'])
&& $_SESSION['ip_address'] !== $this->CI->input->ip_address())
{
// IP doesn't match - destroy
+ log_message('debug', 'Session: IP address mismatch');
$destroy = TRUE;
}
elseif ($config['sess_match_useragent'] === TRUE && isset($_SESSION['user_agent'])
&& $_SESSION['user_agent'] !== trim(substr($this->CI->input->user_agent(), 0, 50)))
{
// Agent doesn't match - destroy
+ log_message('debug', 'Session: User Agent string mismatch');
$destroy = TRUE;
}
@@ -145,9 +148,10 @@ class CI_Session_native extends CI_Session_driver {
&& ($_SESSION['last_activity'] + $config['sess_time_to_update']) < $now)
{
// Changing the session ID amidst a series of AJAX calls causes problems
- if( ! $this->CI->input->is_ajax_request())
+ if ( ! $this->CI->input->is_ajax_request())
{
// Regenerate ID, but don't destroy session
+ log_message('debug', 'Session: Regenerate ID');
$this->sess_regenerate(FALSE);
}
}