[wp-trac] [WordPress Trac] #14937: Multisite updload does not handle files with two or more dots in the filename

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 22 16:16:50 UTC 2010


#14937: Multisite updload does not handle files with two or more dots in the
filename
--------------------------+-------------------------------------------------
 Reporter:  larysa        |       Owner:                  
     Type:  defect (bug)  |      Status:  new             
 Priority:  normal        |   Milestone:  Awaiting Review 
Component:  Multisite     |     Version:  3.0.1           
 Severity:  normal        |    Keywords:  multisite upload
--------------------------+-------------------------------------------------
 This is a new tickets, as the old one was not solved.

 The problem migrated from WPMU 2.9.2 /wp-content/blogs.php to WP 3.0.1
 /wp-includes/ms-files.php without been solved.

 Now, the same chnge is needed in /wp-includes/ms-files.php

 Below goes the original ticket.

 Replying to [ticket:12756 Namely]:
 > * WP does not properly download images that have two or more dots in the
 file name
 > > E.g., One..jpg One...jpg One....jpg
 >
 > rewrites do work (checked)
 >
 > * this is clearly a WP issue:
 > > /wp-content/blogs.php
 > ...
 > $file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] );
 > if ( !is_file( $file ) ) {
 >       status_header( 404 );
 >       die('404 — File not found.');
 > }
 > ...
 > > WP removes two dots!!!
 >
 > > workaround:
 > $file = BLOGUPLOADDIR . $_GET[ 'file' ]; // name.ly: workaround for
 files with two or more dots
 >
 > tested and works fine

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14937>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list