Changeset 41447 for branches/4.0/src/wp-admin/plugins.php
- Timestamp:
- 09/19/2017 01:41:08 PM (6 years ago)
- Location:
- branches/4.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
- Property svn:mergeinfo changed
/branches/4.1 (added) merged: 41446 /branches/4.2 merged: 41445 /branches/4.3 merged: 41444 /branches/4.4 (added) merged: 41434 /branches/4.5 (added) merged: 41415-41416 /branches/4.6 merged: 41414 /trunk reverse-merged: 18512
- Property svn:mergeinfo changed
-
branches/4.0/src/wp-admin/plugins.php
r40177 r41447 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($_REQUEST['s']) : ''; 22 22 … … 38 38 check_admin_referer('activate-plugin_' . $plugin); 39 39 40 $result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . $plugin), is_network_admin() );40 $result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . urlencode( $plugin ) ), is_network_admin() ); 41 41 if ( is_wp_error( $result ) ) { 42 42 if ( 'unexpected_output' == $result->get_error_code() ) { 43 $redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . $plugin. "&plugin_status=$status&paged=$page&s=$s");43 $redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . urlencode( $plugin ) . "&plugin_status=$status&paged=$page&s=$s"); 44 44 wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); 45 45 exit; … … 68 68 check_admin_referer('bulk-plugins'); 69 69 70 $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked']: array();70 $plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array(); 71 71 72 72 if ( is_network_admin() ) { … … 108 108 109 109 if ( isset( $_GET['plugins'] ) ) 110 $plugins = explode( ',', $_GET['plugins']);110 $plugins = explode( ',', wp_unslash( $_GET['plugins'] ) ); 111 111 elseif ( isset( $_POST['checked'] ) ) 112 $plugins = (array) $_POST['checked'];112 $plugins = (array) wp_unslash( $_POST['checked'] ); 113 113 else 114 114 $plugins = array(); … … 182 182 check_admin_referer('bulk-plugins'); 183 183 184 $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked']: array();184 $plugins = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array(); 185 185 // Do not deactivate plugins which are already deactivated. 186 186 if ( is_network_admin() ) { … … 214 214 215 215 //$_POST = from the plugin form; $_GET = from the FTP details screen. 216 $plugins = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked']: array();216 $plugins = isset( $_REQUEST['checked'] ) ? (array) wp_unslash( $_REQUEST['checked'] ) : array(); 217 217 if ( empty( $plugins ) ) { 218 218 wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
Note: See TracChangeset
for help on using the changeset viewer.