aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-12-08 10:25:57 +0100
committerGravatar GitHub <noreply@github.com> 2022-12-08 10:25:57 +0100
commited578f224c4ab80ae6689c7fca3f9f7b12c13428 (patch)
tree81e70dcf91d494be9657fd7a334f5f3c74c82b31
parenta501cc88e7cf78cd5f39b4c1c29b9fcb38ac71a4 (diff)
Security fix in ext.php (#4928)
Details later. Due to https://github.com/FreshRSS/FreshRSS/pull/3433 (1.18.0)
-rw-r--r--p/ext.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/p/ext.php b/p/ext.php
index b4d32f7ed..2979e2365 100644
--- a/p/ext.php
+++ b/p/ext.php
@@ -101,7 +101,8 @@ if (!isset($_GET['f']) ||
$file_name = urldecode($_GET['f']);
$file_type = $_GET['t'];
-if (empty(SUPPORTED_TYPES[$file_type])) {
+if (empty(SUPPORTED_TYPES[$file_type]) ||
+ empty(SUPPORTED_TYPES[pathinfo($file_name, PATHINFO_EXTENSION)])) {
sendBadRequestResponse('File type is not supported.');
}