Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#14937 closed defect (bug) (duplicate)

Multisite updload does not handle files with two or more dots in the filename

Reported by: larysa's profile larysa Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.1
Component: Multisite Keywords: upload
Focuses: multisite Cc:

Description

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

Change History (1)

#1 @nacin
14 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.