diff options
author | Andrey Andreev <narf@devilix.net> | 2018-06-12 15:40:12 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2018-06-12 15:40:12 +0200 |
commit | a9da3dd2f16a8f97d7bc4ff5572b28e4bb84c813 (patch) | |
tree | aa3770006128ab46d570e6b6aad756e4e92299d9 /system/libraries/Session/Session_driver.php | |
parent | 4d3fea4a628e7a9bc03192fb1a6e2e971f3f9d46 (diff) |
[ci skip] Prepare 3.1.9 release
Diffstat (limited to 'system/libraries/Session/Session_driver.php')
-rw-r--r-- | system/libraries/Session/Session_driver.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index bef5ee41f..2fe30b8a2 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 |