Properly name files with unknown extensions (for people with unfiltered_upload cap, natch). props Nazgul. fixes #4974 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@6116 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-09-14 21:13:23 +00:00
parent f372b1dd05
commit a18368bf3f
1 changed files with 1 additions and 1 deletions

View File

@ -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.