From d8fceac7dd30f6a5e86c3cb9ebb4c2cd841f39d5 Mon Sep 17 00:00:00 2001 From: Ijor Tengab Date: Mon, 27 May 2024 10:57:33 +0700 Subject: [PATCH] Fix #963 (#969) --- tinyfilemanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 62872a62..115f4269 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -608,7 +608,7 @@ function get_file_path () { $use_curl = false; $temp_file = tempnam(sys_get_temp_dir(), "upload-"); $fileinfo = new stdClass(); - $fileinfo->name = trim(basename($url), ".\x00..\x20"); + $fileinfo->name = trim(urldecode(basename($url)), ".\x00..\x20"); $allowed = (FM_UPLOAD_EXTENSION) ? explode(',', FM_UPLOAD_EXTENSION) : false; $ext = strtolower(pathinfo($fileinfo->name, PATHINFO_EXTENSION));