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
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92

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';
}