git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3506 3807eeeb-6ff5-0310-8944-8be069107fe0

This commit is contained in:
phpnut 2006-09-17 16:30:47 +00:00
parent ead9f329e9
commit f12290e835

View file

@ -30,7 +30,14 @@
/**
* Enter description here...
*/
if (is_file('../../vendors/javascript/' . $_GET['file']) && (preg_match('/(.+)\\.js/', $_GET['file']))) {
readfile('../../vendors/javascript/' . $_GET['file']);
$file = $_GET['file'];
$pos = strpos($file, '..');
if ($pos === false) {
if(is_file('../../vendors/javascript/'.$file) && (preg_match('/(\/.+)\\.js/', $file)))
{
readfile('../../vendors/javascript/'.$file);
}
} else {
header('HTTP/1.1 404 Not Found');
}
?>