- This topic is empty.
-
AuthorPosts
-
September 17, 2015 at 7:03 am #208278
amidigital
ParticipantI was recently hit with malware and replaced WP and the theme. All is fine except this…
Warning: unlink(C:\WINDOWS\TEMP/maxbuttons.3.15.tmp) [function.unlink]: Permission denied in D:\home\localuser\csctulsa_wp\wp-admin\includes\file.php on line 464
Download failed. error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest algorithm
I MARKED THE ERROR LINE
`
/**
* Downloads a url to a local temporary file using the WordPress HTTP Class.
* Please note, That the calling function must unlink() the file.
*
* @since 2.5.0
*
* @param string $url the URL of the file to download
* @param int $timeout The timeout for the request to download the file default 300 seconds
* @return mixed WP_Error on failure, string Filename on success.
*/
function download_url( $url, $timeout = 300 ) {
//WARNING: The file is not automatically deleted, The script must unlink() the file.
if ( ! $url )
return new WP_Error(‘http_no_url’, __(‘Invalid URL Provided.’));$tmpfname = wp_tempnam($url);
if ( ! $tmpfname )
return new WP_Error(‘http_no_file’, __(‘Could not create Temporary file.’));$response = wp_safe_remote_get( $url, array( ‘timeout’ => $timeout, ‘stream’ => true, ‘filename’ => $tmpfname ) );
if ( is_wp_error( $response ) ) {
unlink( $tmpfname ); //THIS IS ERROR LINE 464
return $response;
}if ( 200 != wp_remote_retrieve_response_code( $response ) ){
unlink( $tmpfname );
return new WP_Error( ‘http_404’, trim( wp_remote_retrieve_response_message( $response ) ) );
}$content_md5 = wp_remote_retrieve_header( $response, ‘content-md5’ );
if ( $content_md5 ) {
$md5_check = verify_file_md5( $tmpfname, $content_md5 );
if ( is_wp_error( $md5_check ) ) {
unlink( $tmpfname );
return $md5_check;
}
}return $tmpfname;
}
`
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.