Make WordPress Core

Ticket #48316: 48316-fix.diff

File 48316-fix.diff, 528 bytes (added by mpcube, 5 years ago)

Fixing Just UPLOADS (not upload_path), just normal installs (not MU), just directories (not URLs), just if upload-path already exists.

  • wp-includes/functions.php

     
    23092309         */
    23102310        if ( defined( 'UPLOADS' ) && ! ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) ) {
    23112311                $dir = ABSPATH . UPLOADS;
     2312                if ( 0 === strpos( UPLOADS, '../' ) AND realpath( ABSPATH . UPLOADS ) ) {
     2313                        $dir = realpath( ABSPATH . UPLOADS );
     2314                }
    23122315                $url = trailingslashit( $siteurl ) . UPLOADS;
    23132316        }
    23142317