Changes based on feedback, no need for sanitasion since wp_handle_upload alread checks

This commit is contained in:
Gerhard Potgieter 2018-05-29 07:37:25 +02:00
parent 4e40d79f84
commit e3a37f81ee
1 changed files with 1 additions and 2 deletions

View File

@ -295,8 +295,7 @@ class WC_Product_CSV_Importer_Controller {
'test_form' => false,
'mimes' => $valid_filetypes,
);
$import = wc_clean( $_FILES['import'] ); // WPCS: sanitization ok.
$upload = wp_handle_upload( $import, $overrides );
$upload = wp_handle_upload( $_FILES['import'], $overrides ); // WPCS: sanitization ok.
if ( isset( $upload['error'] ) ) {
return new WP_Error( 'woocommerce_product_csv_importer_upload_error', $upload['error'] );