1
0
Эх сурвалжийг харах

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

El RIDO 8 сар өмнө
parent
commit
17ff44037a
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      lib/View.php

+ 1 - 1
lib/View.php

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