mirror of
https://github.com/smarty-php/smarty.git
synced 2026-02-03 22:05:33 +01:00
- reactivated $error_reporting property handling
- fixed typo in compile_continue
- fixed security in {fetch} plugin
- changed back plugin parameters to two. second is template object
with transparent access to Smarty object
- fixed {config_load} scoping form compile time to run time
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
* @return string
|
||||
* @uses smarty_function_escape_special_chars()
|
||||
*/
|
||||
function smarty_function_html_image($params, $smarty, $template)
|
||||
function smarty_function_html_image($params, $template)
|
||||
{
|
||||
require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
|
||||
//$smarty->loadPlugin('Smarty_shared_escape_special_chars');
|
||||
@@ -47,7 +47,7 @@ function smarty_function_html_image($params, $smarty, $template)
|
||||
$prefix = '';
|
||||
$suffix = '';
|
||||
$path_prefix = '';
|
||||
$server_vars = ($smarty->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
|
||||
$server_vars = ($template->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
|
||||
$basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
|
||||
foreach($params as $_key => $_val) {
|
||||
switch ($_key) {
|
||||
@@ -108,8 +108,8 @@ function smarty_function_html_image($params, $smarty, $template)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ($template->security) {
|
||||
if (!$smarty->security_handler->isTrustedResourceDir($_image_path)) {
|
||||
if (isset($template->security_policy)) {
|
||||
if (!$template->security_policy->isTrustedResourceDir($_image_path)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user