Changeset 41399 for trunk/src/wp-admin/plugins.php
- Timestamp:
- 09/19/2017 10:10:35 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/plugins.php
r41290 r41399 18 18 $action = $wp_list_table->current_action(); 19 19 20 $plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin']: '';20 $plugin = isset($_REQUEST['plugin']) ? wp_unslash( $_REQUEST['plugin'] ) : ''; 21 21 $s = isset($_REQUEST['s']) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : ''; 22 22 … … 41 41 check_admin_referer('activate-plugin_' . $plugin); 42 42 43 $result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . $plugin), is_network_admin() );43 $result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . urlencode( $plugin ) ), is_network_admin() ); 44 44 if ( is_wp_error( $result ) ) { 45 45 if ( 'unexpected_output' == $result->get_error_code() ) { 46 $redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . $plugin. "&plugin_status=$status&paged=$page&s=$s");46 $redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . urlencode( $plugin ) . "&plugin_status=$status&paged=$page&s=$s"); 47 47 wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); 48 48 exit; … … 75 75 check_admin_referer('bulk-plugins'); 76 76 77 $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked']: array();77 $plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array(); 78 78 79 79 if ( is_network_admin() ) { … … 128 128 129 129 if ( isset( $_GET['plugins'] ) ) 130 $plugins = explode( ',', $_GET['plugins']);130 $plugins = explode( ',', wp_unslash( $_GET['plugins'] ) ); 131 131 elseif ( isset( $_POST['checked'] ) ) 132 $plugins = (array) $_POST['checked'];132 $plugins = (array) wp_unslash( $_POST['checked'] ); 133 133 else 134 134 $plugins = array(); … … 206 206 check_admin_referer('bulk-plugins'); 207 207 208 $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked']: array();208 $plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array(); 209 209 // Do not deactivate plugins which are already deactivated. 210 210 if ( is_network_admin() ) { … … 251 251 252 252 //$_POST = from the plugin form; $_GET = from the FTP details screen. 253 $plugins = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked']: array();253 $plugins = isset( $_REQUEST['checked'] ) ? (array) wp_unslash( $_REQUEST['checked'] ) : array(); 254 254 if ( empty( $plugins ) ) { 255 255 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") ); … … 385 385 if ( isset( $_POST['checked'] ) ) { 386 386 check_admin_referer('bulk-plugins'); 387 $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked']: array();387 $plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array(); 388 388 $sendback = wp_get_referer(); 389 389
Note: See TracChangeset
for help on using the changeset viewer.