From f1bfe9ca58006119f95fda64f0bcf01284caa33f Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sat, 16 Dec 2023 13:14:38 +0700 Subject: [PATCH] Update dl.php --- dl.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dl.php b/dl.php index d4664fda..ab8d5bc2 100644 --- a/dl.php +++ b/dl.php @@ -201,7 +201,10 @@ if (!in_array($attachment['extension'], $allowed_extensions)) bb_die(sprintf($lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']) . "

" . $lang['FILENAME'] . ": " . $attachment['physical_filename']); } -$download_mode = intval($download_mode[$attachment['extension']]); +if (!$download_mode = intval($download_mode[$attachment['extension']])) +{ + bb_die('Incorrect download mode'); +} if ($thumbnail) { @@ -254,5 +257,5 @@ elseif ($download_mode == INLINE_LINK) } else { - bb_die('Incorrect download mode'); + bb_die('Incorrect download mode: ' . $download_mode); }