mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
added preg_match to check that file is indeed a file ending in .js
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@419 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
6fd89c96d5
commit
7c1d40c4f4
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
|
||||
if(is_file('../../vendors/javascript/'.$_GET['file']))
|
||||
if(is_file('../../vendors/javascript/'.$_GET['file']) && (preg_match('/(.+)\\.js/', $_GET['file'])))
|
||||
{
|
||||
readfile('../../vendors/javascript/'.$_GET['file']);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue