WordPress.org

Make WordPress Core

Ticket #18592: add-trailingslashit.diff

File add-trailingslashit.diff, 498 bytes (added by wonderboymusic, 10 years ago)

Patch for this ticket

  • wp-includes/ms-files.php

     
    2323        die( '404 — File not found.' );
    2424}
    2525
    26 $file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] );
     26$file = trailingslashit( BLOGUPLOADDIR ) . str_replace( '..', '', $_GET[ 'file' ] );
    2727if ( !is_file( $file ) ) {
    2828        status_header( 404 );
    2929        die( '404 — File not found.' );