- bugfix removed security hole when using {$smarty.template}

This commit is contained in:
uwe.tews@googlemail.com
2011-02-09 17:50:05 +00:00
parent 5c8541eae3
commit 0154f17de2
2 changed files with 5 additions and 4 deletions

View File

@@ -1,4 +1,7 @@
===== SVN trunk =====
09/02/2011
- bugfix removed security hole when using {$smarty.template}
01/02/2011
- removed assert() from config and template parser

View File

@@ -56,12 +56,10 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
break;
case 'template':
$_template_name = basename($compiler->template->getTemplateFilepath());
return "'$_template_name'";
return 'basename($_smarty_tpl->getTemplateFilepath())';
case 'current_dir':
$_template_dir_name = dirname($compiler->template->getTemplateFilepath());
return "'$_template_dir_name'";
return 'dirname($_smarty_tpl->getTemplateFilepath())';
case 'version':
$_version = Smarty::SMARTY_VERSION;