From c448e53286addf9d47c8b1c076c65f30d14d8038 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 19 Sep 2017 11:52:37 +0000 Subject: [PATCH] Customize: Ensure valid themes in the preview. Merge of [41397] to the 4.4 branch. Built from https://develop.svn.wordpress.org/branches/4.4@41433 git-svn-id: http://core.svn.wordpress.org/branches/4.4@41266 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 861f09a2e8..0a2247a06b 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -388,7 +388,7 @@ final class WP_Customize_Manager { $this->original_stylesheet = get_stylesheet(); - $this->theme = wp_get_theme( isset( $_REQUEST['theme'] ) ? $_REQUEST['theme'] : null ); + $this->theme = wp_get_theme( isset( $_REQUEST['theme'] ) && 0 === validate_file( $_REQUEST['theme'] ) ? $_REQUEST['theme'] : null ); if ( $this->is_theme_active() ) { // Once the theme is loaded, we'll validate it.