From 47e93a3b2f608732381f7ea51e340f36cdb72d13 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Fri, 17 Feb 2017 02:11:24 +0100 Subject: [PATCH] Don't URL encode directory separator --- includes/core.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core.php b/includes/core.php index 0619e5e..897adf5 100644 --- a/includes/core.php +++ b/includes/core.php @@ -46,11 +46,11 @@ function save_file ($file, $name, $arg, $type){ move_uploaded_file($file,CONFIG_FILES_PATH.$file_name); //Check if html or plain text should be returned if($type==='tool'){ - echo CONFIG_ROOT_URL.'/'.urlencode($file_name); + echo CONFIG_ROOT_URL.'/'.str_replace('%2F', '/', urlencode($file_name)); exit(0); }elseif($type==='normal'){ //Return url+filename to the user (HTML) - $n=urlencode($file_name); + $n=str_replace('%2F', '/', urlencode($file_name)); include_once(CONFIG_ROOT_PATH.'upload-done.php'); exit(0); }