【发布时间】:2019-12-21 18:31:00
【问题描述】:
class TemplateController
{
public function get(string $template): string
{
return file_get_contents(_DIST . '/resources/templates/' . $template . '.html');
}
}
我使用 $_GET 或地址栏的直接参数从 SPA 应用程序导入模板。这会导致问题吗?
我在输入周围使用引号来运行命令以访问不可访问的文件等。
【问题讨论】:
标签: php laravel file-get-contents code-injection