﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
18592	add trailingslashit to BLOGUPLOADDIR in ms-files.php	wonderboymusic	nacin	"BLOGUPLOADDIR is trailingslashit'd inconsistently - since this value can be set by the user, adding trailingslashit to the constant value in ms-files.php will prevent broken images in sub-blogs when in Multisite mode
{{{
// WRONG
define( 'BLOGUPLOADDIR', $_SERVER['DOCUMENT_ROOT'] . ""/blogs.dir/{$the_id}/files"" );

// RIGHT
define( 'BLOGUPLOADDIR', $_SERVER['DOCUMENT_ROOT'] . ""/blogs.dir/{$the_id}/files/"" );

// CURRENT 
$file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] );

// PROPOSED
$file = trailingslashit( BLOGUPLOADDIR ) . str_replace( '..', '', $_GET[ 'file' ] );
}}}
It's subtle, and hard to debug"	defect (bug)	closed	normal	3.3	Multisite	3.3	normal	fixed	has-patch needs-unit-tests	davecpage
