mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-08 02:01:00 +02:00
fix config_load, compile fetched arrays to compile_dir, switch display
back to runtime. clean up var names and function names, split up compile testing and compiling to separate funcs, rename some template_* functions to file_* functions and update logic so they can be used for file resources other than templates.
This commit is contained in:
@@ -28,7 +28,8 @@ function smarty_function_fetch($params, &$smarty)
|
||||
|
||||
if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
|
||||
$_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
|
||||
if(!$smarty->_execute_core_function('is_secure', $_params)) {
|
||||
require_once(SMARTY_DIR . 'core/core.is_secure.php');
|
||||
if(!smarty_core_is_secure($_params, $smarty)) {
|
||||
$smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user