From b28c8aebaacc4ec8143857ca2f2516e442d2d887 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 28 Apr 2014 21:10:08 +0200 Subject: [PATCH] [ticket/12273] Do not allow template events in non-html files PHPBB3-12273 --- phpBB/phpbb/event/md_exporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/event/md_exporter.php b/phpBB/phpbb/event/md_exporter.php index 574827ac44..b641281a04 100644 --- a/phpBB/phpbb/event/md_exporter.php +++ b/phpBB/phpbb/event/md_exporter.php @@ -259,7 +259,7 @@ class md_exporter $files = explode("\n + ", $file_details); foreach ($files as $file) { - if (!file_exists($this->path . $file)) + if (!file_exists($this->path . $file) || substr($file, -5) !== '.html') { throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 1); }