From bc58804ad3b41b3ef0f1fdc119d0736282a95d95 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 20 Apr 2015 06:44:23 +0000 Subject: [PATCH] Revert [30640], as it was incorrectly checking some filenames. This merges [32171] in the 4.1 branch. See #30377. Built from https://develop.svn.wordpress.org/branches/4.1@32172 git-svn-id: http://core.svn.wordpress.org/branches/4.1@32147 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 76013c934e..d903349cfb 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2049,7 +2049,7 @@ function wp_check_filetype( $filename, $mimes = null ) { $ext = false; foreach ( $mimes as $ext_preg => $mime_match ) { - $ext_preg = '!\.(' . $ext_preg . ')(\?.*)?$!i'; + $ext_preg = '!\.(' . $ext_preg . ')$!i'; if ( preg_match( $ext_preg, $filename, $ext_matches ) ) { $type = $mime_match; $ext = $ext_matches[1];