[cc-commits] [CC SVN] r12718 - cchost/trunk/cchost_lib

webmaster at creativecommons.org webmaster at creativecommons.org
Thu Jun 4 03:21:54 EDT 2009


Author: fourstones
Date: 2009-06-04 07:21:54 +0000 (Thu, 04 Jun 2009)
New Revision: 12718

Modified:
   cchost/trunk/cchost_lib/cc-file-props.php
Log:
bugfix: trying to read huge irrellevant files

Modified: cchost/trunk/cchost_lib/cc-file-props.php
===================================================================
--- cchost/trunk/cchost_lib/cc-file-props.php	2009-06-04 05:15:11 UTC (rev 12717)
+++ cchost/trunk/cchost_lib/cc-file-props.php	2009-06-04 07:21:54 UTC (rev 12718)
@@ -57,6 +57,8 @@
     {
         global $xx;
 
+        if( filesize($filename) > (100 * 1024) )
+            return null;
         $text = file_get_contents($filename);
         if( !preg_match('#.*\[meta\](.*)\[/meta\].*#Ums',$text,$m) )
             return null;




More information about the cc-commits mailing list