[FEATURE] Remove size bound of included TypoScript files
authorRasto Birka <rasto@cs2.ch>
Fri, 1 Apr 2011 13:23:24 +0000 (15:23 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 25 Apr 2011 20:10:14 +0000 (22:10 +0200)
Change-Id: Ib8dd5576d4400cb4da38c86384ce6dd31f734508
Resolves: #25709
Reviewed-on: http://review.typo3.org/1408
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/class.t3lib_tsparser.php

index 921b165..3f24547 100644 (file)
@@ -589,7 +589,7 @@ class t3lib_TSparser {
                                                                        $filename = t3lib_div::getFileAbsFileName(trim($sourceParts[1]));
                                                                        if (strcmp($filename, '')) { // Must exist and must not contain '..' and must be relative
                                                                                if (t3lib_div::verifyFilenameAgainstDenyPattern($filename)) { // Check for allowed files
-                                                                                       if (@is_file($filename) && filesize($filename) < 100000) { // Max. 100 KB include files!
+                                                                                       if (@is_file($filename)) {
                                                                                                        // check for includes in included text
                                                                                                $includedFiles[] = $filename;
                                                                                                $included_text = self::checkIncludeLines(t3lib_div::getUrl($filename), $cycle_counter + 1, $returnFiles);
@@ -600,8 +600,12 @@ class t3lib_TSparser {
                                                                                                        $included_text = $included_text['typoscript'];
                                                                                                }
                                                                                                $newString .= $included_text . LF;
+                                                                                       } else {
+                                                                                               $newString .= "\n###\n### ERROR: File \"" . $filename . "\" was not was not found.\n###\n\n";
+                                                                                               t3lib_div::sysLog('File "' . $filename . '" was not found.', 'Core', 2);
                                                                                        }
                                                                                } else {
+                                                                                       $newString .= "\n###\n### ERROR: File \"" . $filename . "\" was not included since it is not allowed due to fileDenyPattern\n###\n\n";
                                                                                        t3lib_div::sysLog('File "' . $filename . '" was not included since it is not allowed due to fileDenyPattern', 'Core', 2);
                                                                                }
                                                                        }