Properly anchor mime preg.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fad60afa23
commit
569c17df7f
|
@ -707,7 +707,7 @@ function sanitize_file_name( $filename ) {
|
|||
if ( preg_match("/^[a-zA-Z]{2,5}\d?$/", $part) ) {
|
||||
$allowed = false;
|
||||
foreach ( $mimes as $ext_preg => $mime_match ) {
|
||||
$ext_preg = '!(^' . $ext_preg . ')$!i';
|
||||
$ext_preg = '!^(' . $ext_preg . ')$!i';
|
||||
if ( preg_match( $ext_preg, $part ) ) {
|
||||
$allowed = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue