Project

General

Profile

Bug #24221 » verifyfilename.patch

Administrator Admin, 2010-11-28 17:40

View differences:

t3lib/class.t3lib_tsparser.php (working copy)
case 'file':
$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)) {
if (@is_file($filename) && filesize($filename)<100000) { // Max. 100 KB include files!
// check for includes in included text
$includedFiles[] = $filename;
......
}
$newString.= $included_text.LF;
}
} else {
t3lib_div::sysLog('File "'.$filename.'" was not included because it does not match the fileDenyPattern', 'Core', 2);
$newString.= '### ERROR: File was not included because it does not match the fileDenyPattern.'.LF;
}
}
break;
}
(1-1/5)