Don't unslash variables that came from wp_reset_vars(). see #21767.

git-svn-id: http://core.svn.wordpress.org/trunk@23580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-03-01 18:59:54 +00:00
parent 3a86ceb816
commit b96c604833
2 changed files with 4 additions and 5 deletions

View File

@ -27,10 +27,9 @@ $plugins = get_plugins();
if ( empty($plugins) )
wp_die( __('There are no plugins installed on this site.') );
if ( isset($_REQUEST['file']) )
$plugin = wp_unslash($_REQUEST['file']);
if ( empty($plugin) ) {
if ( $file ) {
$plugin = $file;
} elseif ( empty( $plugin ) ) {
$plugin = array_keys($plugins);
$plugin = $plugin[0];
}

View File

@ -68,7 +68,7 @@ if ( empty( $file ) ) {
$relative_file = 'style.css';
$file = $allowed_files['style.css'];
} else {
$relative_file = wp_unslash( $file );
$relative_file = $file;
$file = $theme->get_stylesheet_directory() . '/' . $relative_file;
}