summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/drivers/Session_memcached_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_memcached_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_memcached_driver.php')
-rw-r--r--system/libraries/Session/drivers/Session_memcached_driver.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php
index d9506ba7e..efc084d8b 100644
--- a/system/libraries/Session/drivers/Session_memcached_driver.php
+++ b/system/libraries/Session/drivers/Session_memcached_driver.php
@@ -145,6 +145,8 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
return $this->_fail();
}
+ $this->php5_validate_id();
+
return $this->_success;
}
@@ -290,6 +292,23 @@ class CI_Session_memcached_driver extends CI_Session_driver implements SessionHa
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)
+ {
+ $this->_memcached-get($this->_key_prefix.$id);
+ return ($this->_memcached->getResultCode() === Memcached::RES_SUCCESS);
+ }
+
// ------------------------------------------------------------------------
/**