mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-06 13:44:30 +00:00
Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: https://develop.svn.wordpress.org/trunk@23554 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -28,7 +28,7 @@ if ( empty($plugins) )
|
||||
wp_die( __('There are no plugins installed on this site.') );
|
||||
|
||||
if ( isset($_REQUEST['file']) )
|
||||
$plugin = wp_unslash($_REQUEST['file']);
|
||||
$plugin = stripslashes($_REQUEST['file']);
|
||||
|
||||
if ( empty($plugin) ) {
|
||||
$plugin = array_keys($plugins);
|
||||
@@ -39,6 +39,8 @@ $plugin_files = get_plugin_files($plugin);
|
||||
|
||||
if ( empty($file) )
|
||||
$file = $plugin_files[0];
|
||||
else
|
||||
$file = stripslashes($file);
|
||||
|
||||
$file = validate_file_to_edit($file, $plugin_files);
|
||||
$real_file = WP_PLUGIN_DIR . '/' . $file;
|
||||
@@ -50,7 +52,7 @@ case 'update':
|
||||
|
||||
check_admin_referer('edit-plugin_' . $file);
|
||||
|
||||
$newcontent = wp_unslash( $_POST['newcontent'] );
|
||||
$newcontent = stripslashes($_POST['newcontent']);
|
||||
if ( is_writeable($real_file) ) {
|
||||
$f = fopen($real_file, 'w+');
|
||||
fwrite($f, $newcontent);
|
||||
|
||||
Reference in New Issue
Block a user