diff options
author | Derek Jones <derek.jones@ellislab.com> | 2009-09-24 16:25:39 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2009-09-24 16:25:39 +0200 |
commit | 8a52791ee8387e6f5cac570088ee18183900741b (patch) | |
tree | 84ad5394fac6ade7ddbafde3e885aec4a0927e27 | |
parent | f3c4f277a7d0dfcddcfb4656f439b660a7398831 (diff) |
increased randomness of file name used in is_really_writable()
-rw-r--r-- | system/codeigniter/Common.php | 2 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php index eb9dce648..73ff0196f 100644 --- a/system/codeigniter/Common.php +++ b/system/codeigniter/Common.php @@ -62,7 +62,7 @@ function is_really_writable($file) // write a file then read it. Bah... if (is_dir($file)) { - $file = rtrim($file, '/').'/'.md5(rand(1,100)); + $file = rtrim($file, '/').'/'.md5(mt_rand(1,100).mt_rand(1,100)); if (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) { diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 6ec6cd32f..a6eaef166 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -76,6 +76,7 @@ SVN Revision: </p> <h3>Bug fixes for 1.7.3</h3> <ul> + <li>Increased randomness with<kbd>is_really_writable()</kbd> to avoid file collisions when hundreds or thousands of requests occur at once.</li> <li>Fixed or clarified assorted user guide typos or examples.</li> </ul> |