aboutsummaryrefslogtreecommitdiff
path: root/p/ext.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-09-27 14:40:35 +0200
committerGravatar GitHub <noreply@github.com> 2025-09-27 14:40:35 +0200
commit3a795eb5dbcd5b901d99a1b509a8c1a5746e8ea1 (patch)
tree39ece831e0a28fab172a8b9451030bbfbf8d5d6f /p/ext.php
parent2da733b5cfde04c4cd8a091d4d7ee8e0d2622d84 (diff)
Fix regression in ext.php (#8021)
fix https://github.com/FreshRSS/Extensions/issues/370 Regression from https://github.com/FreshRSS/FreshRSS/pull/7857
Diffstat (limited to 'p/ext.php')
-rw-r--r--p/ext.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/p/ext.php b/p/ext.php
index 4ee9eb1ae..2150f54e8 100644
--- a/p/ext.php
+++ b/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}'");