trailingslashit isn't normally available in ms-files. props davecpage, fixes #18592.

git-svn-id: https://develop.svn.wordpress.org/trunk@18642 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-09-06 15:41:57 +00:00
parent d6eb11b05b
commit a0cd13553b
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ if ( $current_blog->archived == '1' || $current_blog->spam == '1' || $current_bl
die( '404 — File not found.' );
}
$file = trailingslashit( BLOGUPLOADDIR ) . str_replace( '..', '', $_GET[ 'file' ] );
$file = rtrim( BLOGUPLOADDIR, '/' ) . '/' . str_replace( '..', '', $_GET[ 'file' ] );
if ( !is_file( $file ) ) {
status_header( 404 );
die( '404 — File not found.' );