escape view parameter

This commit is contained in:
Manuel Raynaud
2013-10-09 09:05:48 +02:00
parent e8fd822795
commit d866ffaaf5
2 changed files with 3 additions and 3 deletions

View File

@@ -212,14 +212,14 @@ class SmartyParser extends Smarty implements ParserInterface
$templateDir = realpath(THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/");
if (strpos($pathFileName, $templateDir) !== 0) {
throw new ResourceNotFoundException(sprintf("'%s' view does not exists", $file));
throw new ResourceNotFoundException(sprintf("'%s' view does not exists", htmlspecialchars($file)));
}
if (!file_exists($fileName)) {
$fileName .= ".html";
if (!file_exists($fileName)) {
throw new ResourceNotFoundException(sprintf("'%s' file not found in %s template", $file, $this->template));
throw new ResourceNotFoundException(sprintf("'%s' file not found in %s template", htmlspecialchars($file), $this->template));
}
}