Skip to content

Commit

Permalink
Don't unslash variables that came from wp_reset_vars(). see #21767.
Browse files Browse the repository at this point in the history
git-svn-id: http://core.svn.wordpress.org/trunk@23580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Mar 1, 2013
1 parent 3a86ceb commit b96c604
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions wp-admin/plugin-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@
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];
}
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/theme-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
$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;
}

Expand Down

0 comments on commit b96c604

Please sign in to comment.