Make WordPress Core

Changeset 41433


Ignore:
Timestamp:
09/19/2017 11:49:52 AM (7 years ago)
Author:
ocean90
Message:

Customize: Ensure valid themes in the preview.

Merge of [41397] to the 4.4 branch.

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-includes/class-wp-customize-manager.php

    r40708 r41433  
    389389        $this->original_stylesheet = get_stylesheet();
    390390
    391         $this->theme = wp_get_theme( isset( $_REQUEST['theme'] ) ? $_REQUEST['theme'] : null );
     391        $this->theme = wp_get_theme( isset( $_REQUEST['theme'] ) && 0 === validate_file( $_REQUEST['theme'] ) ? $_REQUEST['theme'] : null );
    392392
    393393        if ( $this->is_theme_active() ) {
Note: See TracChangeset for help on using the changeset viewer.