summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/Session_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/Session_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/Session_driver.php')
-rw-r--r--system/libraries/Session/Session_driver.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php
index e0030889c..6ed365959 100644
--- a/system/libraries/Session/Session_driver.php
+++ b/system/libraries/Session/Session_driver.php
@@ -113,6 +113,23 @@ abstract class CI_Session_driver implements SessionHandlerInterface {
// ------------------------------------------------------------------------
/**
+ * PHP 5.x validate ID
+ *
+ * Enforces session.use_strict_mode on PHP 5.x (7+ does it by itself)
+ *
+ * @return void
+ */
+ public function php5_validate_id()
+ {
+ if (PHP_VERSION_ID < 70000 && isset($_COOKIE[$this->_config['cookie_name']]) && ! $this->validateId($_COOKIE[$this->_config['cookie_name']]))
+ {
+ unset($_COOKIE[$this->_config['cookie_name']]);
+ }
+ }
+
+ // ------------------------------------------------------------------------
+
+ /**
* Cookie destroy
*
* Internal method to force removal of a cookie by the client