فهرست منبع

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

El RIDO 10 ماه پیش
والد
کامیت
4ac8ffa2a4
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';
     }