[ticket/12273] Do not allow template events in non-html files

PHPBB3-12273
This commit is contained in:
Joas Schilling 2014-04-28 21:10:08 +02:00
parent da6eb0282d
commit b28c8aebaa

View file

@ -259,7 +259,7 @@ class md_exporter
$files = explode("\n + ", $file_details); $files = explode("\n + ", $file_details);
foreach ($files as $file) 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); throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 1);
} }