From 28b7da1c4f68eecfaa07eecb1f15e351f52df1cf Mon Sep 17 00:00:00 2001 From: saxmatt Date: Mon, 12 Apr 2004 17:25:59 +0000 Subject: [PATCH] File type matching should be case-insensitive. git-svn-id: http://svn.automattic.com/wordpress/trunk@1060 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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.");