summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAndrew Nacin <nacin@git.wordpress.org>2013-02-15 02:01:36 +0000
committerAndrew Nacin <nacin@git.wordpress.org>2013-02-15 02:01:36 +0000
commit36d09ab2ef40d200c803bebf49ee7e8e08647a97 (patch)
treef560c2d32b1dd028c0c73559c152708005b69c13
parent2d34b9a8766b387176abda12030b3b17612a2da1 (diff)
downloadwordpress-36d09ab2ef40d200c803bebf49ee7e8e08647a97.tar.gz
wordpress-36d09ab2ef40d200c803bebf49ee7e8e08647a97.zip
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
-rw-r--r--wp-admin/plugin-editor.php4
-rw-r--r--wp-admin/theme-editor.php2
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;
}