Skip to content

Commit

Permalink
- bugfix removed security hole when using {$smarty.template}
Browse files Browse the repository at this point in the history
  • Loading branch information
uwetews committed Feb 9, 2011
1 parent 5c8541e commit 0154f17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,10 @@ public function compile($args, $compiler, $parameter)
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;
Expand Down

0 comments on commit 0154f17

Please # to comment.