summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/drivers/Session_redis_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2018-06-12 15:57:07 +0200
committerAndrey Andreev <narf@devilix.net>2018-06-12 15:57:07 +0200
commitb3f7aae1079e8e484437bc67f4c126f34e7903d8 (patch)
tree8d5961bc6260fec1769f852f2383656e15e5b77a /system/libraries/Session/drivers/Session_redis_driver.php
parent1fd1494c709ced0b20252976c65145e21be046ee (diff)
parent44f53fb063eed55c79d31d0d19eef7ba973b6054 (diff)
Merge branch '3.1-stable' into develop
Conflicts resolved: system/core/CodeIgniter.php system/libraries/Email.php user_guide_src/source/changelog.rst user_guide_src/source/conf.py user_guide_src/source/installation/downloads.rst user_guide_src/source/installation/upgrading.rst
Diffstat (limited to 'system/libraries/Session/drivers/Session_redis_driver.php')
-rw-r--r--system/libraries/Session/drivers/Session_redis_driver.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php
index 0fee40e3a..0562301b2 100644
--- a/system/libraries/Session/drivers/Session_redis_driver.php
+++ b/system/libraries/Session/drivers/Session_redis_driver.php
@@ -177,6 +177,8 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle
log_message('error', 'Session: Unable to connect to Redis with the configured settings.');
}
+ $this->php5_validate_id();
+
return $this->_fail();
}
@@ -334,6 +336,22 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle
return $this->_success;
}
+ // --------------------------------------------------------------------
+
+ /**
+ * Validate ID
+ *
+ * Checks whether a session ID record exists server-side,
+ * to enforce session.use_strict_mode.
+ *
+ * @param string $id
+ * @return bool
+ */
+ public function validateId($id)
+ {
+ return (bool) $this->_redis->exists($this->_key_prefix.$id);
+ }
+
// ------------------------------------------------------------------------
/**