Ticket #20074: 20074.4.diff
File 20074.4.diff, 755 bytes (added by , 12 years ago) |
---|
-
src/wp-admin/includes/file.php
485 485 return new WP_Error( 'http_404', trim( wp_remote_retrieve_response_message( $response ) ) ); 486 486 } 487 487 488 $content_md5 = wp_remote_retrieve_header( $response, 'content-md5' ); 489 if ( $content_md5 ) { 490 $md5_file = md5_file( $tmpfname ); 491 if ( $md5_file != $content_md5 ) { 492 unlink( $tmpfname ); 493 return new WP_Error( 'download_verification_failed', sprintf( __( 'The checksum of the download (%1$s) does not match the provided checksum value (%2$s).' ), $md5_file, $content_md5 ) ); 494 } 495 } 496 488 497 return $tmpfname; 489 498 } 490 499