From 62161136baaf9b4f7b31a5b932eaa582607725ab Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 12 Apr 2004 17:25:59 +0000 Subject: [PATCH] File type matching should be case-insensitive. git-svn-id: https://develop.svn.wordpress.org/trunk@1060 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 6e3ca0b871..e327ff32de 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -9,7 +9,7 @@ if ($user_level == 0) //Checks to see if user has logged in if (!get_settings('use_fileupload')) //Checks if file upload is enabled in the config die ("The admin disabled this function"); -$allowed_types = explode(' ', trim(get_settings('fileupload_allowedtypes'))); +$allowed_types = explode(' ', trim(strtolower(get_settings('fileupload_allowedtypes')))); if ($HTTP_POST_VARS['submit']) { $action = 'upload'; @@ -89,7 +89,7 @@ case 'upload': $imgdesc = str_replace('"', '"', $HTTP_POST_VARS['imgdesc']); $imgtype = explode(".",$img1_name); - $imgtype = $imgtype[count($imgtype)-1]; + $imgtype = strtolower($imgtype[count($imgtype)-1]); if (in_array($imgtype, $allowed_types) == false) { die("File $img1_name of type $imgtype is not allowed.");