summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/drivers/Session_native.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-07-17 18:59:20 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-17 18:59:20 +0200
commite18de50dc1a4369aef18df9b368f8bfb0f9177d9 (patch)
tree07708fb20dbe57adc99f4d71683b8b22673a2d28 /system/libraries/Session/drivers/Session_native.php
parent2ecc06ce74e089f6d57ed396f006b749e7741999 (diff)
Cherry-picking some changes from PR #2425:
- Session events logging (debug) - Bug fix for OCI8 method stored_procedure()
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);
}
}