1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Fix: cache files should not be world-writeable; incompatible with cgi-mode php

This commit is contained in:
mrpete
2007-03-04 15:01:28 +00:00
parent b6c0946f37
commit 8a7c840d01

View File

@@ -1,10 +1,10 @@
<?php <?php
/* /*
+ ----------------------------------------------------------------------------+ + ----------------------------------------------------------------------------+
| e107 website system | e107 website system
| |
| <EFBFBD>Steve Dunstan 2001-2002 | Steve Dunstan 2001-2002
| http://e107.org | http://e107.org
| jalist@e107.org | jalist@e107.org
| |
@@ -12,9 +12,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/cache_handler.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/cache_handler.php,v $
| $Revision: 1.2 $ | $Revision: 1.3 $
| $Date: 2007-02-04 17:36:16 $ | $Date: 2007-03-04 15:01:28 $
| $Author: mcfly_e107 $ | $Author: mrpete $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -24,8 +24,8 @@ if (!defined('e107_INIT')) { exit; }
* Class to cache data as files, improving site speed and throughput. * Class to cache data as files, improving site speed and throughput.
* *
* @package e107 * @package e107
* @version $Revision: 1.2 $ * @version $Revision: 1.3 $
* @author $Author: mcfly_e107 $ * @author $Author: mrpete $
*/ */
class ecache { class ecache {
@@ -138,7 +138,7 @@ class ecache {
{ {
$cache_file = (isset($this) ? $this->cache_fname($CacheTag, $syscache) : ecache::cache_fname($CacheTag, $syscache)); $cache_file = (isset($this) ? $this->cache_fname($CacheTag, $syscache) : ecache::cache_fname($CacheTag, $syscache));
file_put_contents($cache_file, ($bRaw? $Data : '<?php'.$Data) ); file_put_contents($cache_file, ($bRaw? $Data : '<?php'.$Data) );
@chmod($cache_file, 0777); @chmod($cache_file, 0755); //Cache should not be world-writeable
@touch($cache_file); @touch($cache_file);
} }
} }