inc-cache.php3 1.41 1.42

Update of /home/spip-cvs/spip
In directory alan:/tmp/cvs-serv29840

Modified Files:
  inc-cache.php3
Log Message:
controle qu'une destruction de cache concerne le bon répertoire 2

Index: inc-cache.php3

RCS file: /home/spip-cvs/spip/inc-cache.php3,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- inc-cache.php3 17 Jul 2004 09:03:21 -0000 1.41
+++ inc-cache.php3 17 Jul 2004 09:07:56 -0000 1.42
@@ -403,7 +403,7 @@
     {
       $dir = dir_var();
       foreach ($caches as $path)
- { if (strpos($path, $dir) === 0)
+ { if ((strpos($path, $dir) === 0) && (strpos($path, '../') === false))
       @unlink($GLOBALS['flag_ecrire'] ? ('../' . $path) : $path);
     else die("PIRATE");
   }