From 9b3cef3a108055b67a9c34c6b07cd0aea3030eff Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Sat, 4 Feb 2017 16:54:19 +0800 Subject: Loading global mimes config file first, and then environment file. Signed-off-by: tianhe1986 --- system/core/Common.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'system/core') diff --git a/system/core/Common.php b/system/core/Common.php index 5c6f88ef9..2db94c165 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -318,17 +318,16 @@ if ( ! function_exists('get_mimes')) if (empty($_mimes)) { - if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) - { - $_mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); - } - elseif (file_exists(APPPATH.'config/mimes.php')) + $_mimes = array(); + + if (file_exists(APPPATH.'config/mimes.php')) { - $_mimes = include(APPPATH.'config/mimes.php'); + $_mimes = array_merge($_mimes, include(APPPATH.'config/mimes.php')); } - else + + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) { - $_mimes = array(); + $_mimes = array_merge($_mimes, include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')); } } -- cgit v1.2.3-24-g4f1b From b3c113f60a0343c3dbf16a3b6898270c698f45bb Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Sat, 4 Feb 2017 16:57:45 +0800 Subject: Removing url encoded 127. Signed-off-by: tianhe1986 --- system/core/Common.php | 1 + 1 file changed, 1 insertion(+) (limited to 'system/core') diff --git a/system/core/Common.php b/system/core/Common.php index 2db94c165..cef9f47e0 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -717,6 +717,7 @@ if ( ! function_exists('remove_invisible_characters')) { $non_displayables[] = '/%0[0-8bcef]/i'; // url encoded 00-08, 11, 12, 14, 15 $non_displayables[] = '/%1[0-9a-f]/i'; // url encoded 16-31 + $non_displayables[] = '/%7f/i'; // url encoded 127 } $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127 -- cgit v1.2.3-24-g4f1b