aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/phpbb/event/md_exporter.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/phpbb/event/md_exporter.php b/phpBB/phpbb/event/md_exporter.php
index b641281a04..a8d9eb1f3c 100644
--- a/phpBB/phpbb/event/md_exporter.php
+++ b/phpBB/phpbb/event/md_exporter.php
@@ -287,6 +287,11 @@ class md_exporter
else if ($this->filter == 'adm')
{
$file = substr($file_details, strlen('* Location: '));
+ if (!file_exists($this->path . $file) || substr($file, -5) !== '.html')
+ {
+ throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 1);
+ }
+
$files_list['adm'][] = substr($file, strlen('adm/style/'));
$this->events_by_file[$file][] = $this->current_event;