Просмотр исходного кода

Fix regression in ext.php (#8021)

fix https://github.com/FreshRSS/Extensions/issues/370
Regression from https://github.com/FreshRSS/FreshRSS/pull/7857
Alexandre Alapetite 6 месяцев назад
Родитель
Сommit
3a795eb5db
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      p/ext.php

+ 6 - 0
p/ext.php

@@ -91,6 +91,12 @@ if (!is_valid_path($absolute_filename)) {
 	sendBadRequestResponse('File is not supported.');
 }
 
+FreshRSS_Context::initSystem();
+if (!FreshRSS_Context::hasSystemConf()) {
+	header('HTTP/1.1 500 Internal Server Error');
+	die('Invalid system init!');
+}
+
 $content_type = FreshRSS_extension_Controller::MIME_TYPES[$file_type];
 header("Content-Type: {$content_type}");
 header("Content-Disposition: inline; filename='{$file_name}'");