From 62d057b21113f25b93a0e36ab2a2f2305b9fffd0 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 24 Mar 2024 20:50:20 +0700 Subject: [PATCH] Disable excluded extension name from viewing (#2) --- tinyfilemanager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 3dfd604..6d2593f 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -1647,7 +1647,7 @@ if (isset($_GET['view'])) { $file = $_GET['view']; $file = fm_clean_path($file, false); $file = str_replace('/', '', $file); - if ($file == '' || !is_file($path . '/' . $file) || in_array($file, $GLOBALS['exclude_items'])) { + if ($file == '' || !is_file($path . '/' . $file) || !fm_is_exclude_items($file)) { fm_set_msg(lng('File not found'), 'error'); $FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH)); } @@ -1846,7 +1846,7 @@ if (isset($_GET['edit']) && !FM_READONLY) { $file = $_GET['edit']; $file = fm_clean_path($file, false); $file = str_replace('/', '', $file); - if ($file == '' || !is_file($path . '/' . $file) || in_array($file, $GLOBALS['exclude_items'])) { + if ($file == '' || !is_file($path . '/' . $file) || !fm_is_exclude_items($file)) { fm_set_msg(lng('File not found'), 'error'); $FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH)); }