Properly name files with unknown extensions (for people with unfiltered_upload cap, natch). props Nazgul. fixes #4974 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@6116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8a6802ef00
commit
d3db272764
|
@ -140,7 +140,7 @@ function wp_handle_upload( &$file, $overrides = false ) {
|
|||
return $upload_error_handler( $file, __( 'File type does not meet security guidelines. Try another.' ));
|
||||
|
||||
if ( !$ext )
|
||||
$ext = strrchr($file['name'], '.');
|
||||
$ext = ltrim(strrchr($file['name'], '.'), '.');
|
||||
}
|
||||
|
||||
// A writable uploads dir will pass this test. Again, there's no point overriding this one.
|
||||
|
|
Loading…
Reference in New Issue