prevent use of paths in template names, only file names inside tpl directory are allowed

This commit is contained in:
El RIDO
2025-11-10 12:23:50 +01:00
parent 13949349af
commit 17ff44037a

View File

@@ -66,7 +66,7 @@ class View
*/
public static function getTemplateFilePath(string $template): string
{
$file = self::isBootstrapTemplate($template) ? 'bootstrap' : $template;
$file = self::isBootstrapTemplate($template) ? 'bootstrap' : basename($template);
return PATH . 'tpl' . DIRECTORY_SEPARATOR . $file . '.php';
}