diff options
author | Andrey Andreev <narf@devilix.net> | 2019-10-21 10:18:12 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2019-10-21 10:18:12 +0200 |
commit | 6fd8d3f5180700e9b288d2d8446b5e09413c6230 (patch) | |
tree | 35990803bfcedce6b7e1b355cad72d8c96227a6b | |
parent | 35d419deb4974a2dde82e294eddb5ea943c3b313 (diff) |
[ci skip] Fix #5857
-rw-r--r-- | system/libraries/Session/drivers/Session_files_driver.php | 4 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 2899b7dec..d9966273b 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -196,6 +196,10 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle $this->_fingerprint = md5(''); return ''; } + + // Prevent possible data corruption + // See https://github.com/bcit-ci/CodeIgniter/issues/5857 + clearstatcache(TRUE, $this->_file_path.$session_id); } // We shouldn't need this, but apparently we do ... // See https://github.com/bcit-ci/CodeIgniter/issues/4039 diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index fe63c8bed..079794b29 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.1.12 - Fixed a bug (#5834) - :doc:`Query Builder <database/query_builder>` method ``count_all_results()`` triggered an SQL error for queries with a ``HAVING`` clause. - Fixed a bug (#5840) - :doc:`Cache Library <libraries/caching>` 'redis' driver triggered an ``E_DEPRECATED`` warning about ``sRemove()`` with phpRedis 5. +- Fixed a bug (#5857) - :doc:`Session <libraries/sessions>` data could be corrupted after a concurrent request write with the 'files' driver due to a filesize cache being incorrect. Version 3.1.11 ============== |