diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-06-14 20:56:36 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-06-14 20:56:36 +0200 |
commit | fb56cdb3efd11f4ec6cf053b8f04cc51a7d3bd4e (patch) | |
tree | fd81b4a7064f3dba7bdfadbd7a29424539cef324 /system/libraries/Session/Session_driver.php | |
parent | f34668f94b6a69fa777c6025ccc798b5e3c1110f (diff) | |
parent | 30e2eafa86c4c7b6b39cea3e7089a90df9f603fb (diff) |
Merge tag '3.1.9' of git://github.com/bcit-ci/CodeIgniter into dev
Signed-off-by: Florian Pritz <bluewind@xinu.at>
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 |