X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/baca9ce86a38dc54c4574890ee2d352fd81f78b2..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-admin/network/site-settings.php?ds=sidebyside diff --git a/wp-admin/network/site-settings.php b/wp-admin/network/site-settings.php index f807fcf2..c3aec75d 100644 --- a/wp-admin/network/site-settings.php +++ b/wp-admin/network/site-settings.php @@ -49,17 +49,13 @@ if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] && is_ar switch_to_blog( $id ); - $c = 1; - $count = count( $_POST['option'] ); $skip_options = array( 'allowedthemes' ); // Don't update these options since they are handled elsewhere in the form. foreach ( (array) $_POST['option'] as $key => $val ) { + $key = wp_unslash( $key ); + $val = wp_unslash( $val ); if ( $key === 0 || is_array( $val ) || in_array($key, $skip_options) ) continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options - if ( $c == $count ) - update_option( $key, stripslashes( $val ) ); - else - update_option( $key, stripslashes( $val ), false ); // no need to refresh blog details yet - $c++; + update_option( $key, $val ); } do_action( 'wpmu_update_blog_options' ); @@ -121,7 +117,7 @@ if ( ! empty( $messages ) ) { $class = 'all-options'; if ( is_serialized( $option->option_value ) ) { if ( is_serialized_string( $option->option_value ) ) { - $option->option_value = esc_html( maybe_unserialize( $option->option_value ), 'single' ); + $option->option_value = esc_html( maybe_unserialize( $option->option_value ) ); } else { $option->option_value = 'SERIALIZED DATA'; $disabled = true;