From 36d09ab2ef40d200c803bebf49ee7e8e08647a97 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 15 Feb 2013 02:01:36 +0000 Subject: [PATCH] Do not unslash variables reset by wp_reset_vars(). Remove variables that have never been used in plugin-editor.php. see #21767. git-svn-id: https://develop.svn.wordpress.org/trunk@23419 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/plugin-editor.php | 4 +--- wp-admin/theme-editor.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index 1bfb12d69b..122362a527 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -20,7 +20,7 @@ if ( !current_user_can('edit_plugins') ) $title = __("Edit Plugins"); $parent_file = 'plugins.php'; -wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'plugin')); +wp_reset_vars( array( 'action', 'error', 'file', 'plugin' ) ); $plugins = get_plugins(); @@ -39,8 +39,6 @@ $plugin_files = get_plugin_files($plugin); if ( empty($file) ) $file = $plugin_files[0]; -else - $file = wp_unslash($file); $file = validate_file_to_edit($file, $plugin_files); $real_file = WP_PLUGIN_DIR . '/' . $file; diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index c8298d0c3b..2033a23845 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -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; }