mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-11 22:29:48 +01:00
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: http://core.svn.wordpress.org/trunk@23419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
123ef6ad57
commit
12c4b9bae9
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user