Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify md5 hash when `wp core download` #2461

Merged
merged 3 commits into from Feb 9, 2016

Conversation

@danielbachhuber
Copy link
Member

commented Feb 9, 2016

To permit offline use of the download cache, verification only happens
when downloading a new copy of WordPress.

Fixes #1899

Verify md5 hash when `wp core download`
To permit offline use of the download cache, verification only happens
when downloading a new copy of WordPress.

@danielbachhuber danielbachhuber added this to the 0.23.0 milestone Feb 9, 2016

@@ -142,6 +142,18 @@ public function download( $args, $assoc_args ) {
WP_CLI::error( "Couldn't access download URL (HTTP code {$response->status_code})" );
}
$md5_response = Utils\http_request( 'GET', $download_url . '.md5' );
if ( 20 != substr( $md5_response->status_code, 0, 2 ) ) {

This comment has been minimized.

Copy link
@szepeviktor

szepeviktor Feb 9, 2016

Contributor

Oops! '20' !==

danielbachhuber added a commit that referenced this pull request Feb 9, 2016
Merge pull request #2461 from wp-cli/1899-verify-md5
Verify md5 hash when `wp core download`

@danielbachhuber danielbachhuber merged commit 46a77e6 into master Feb 9, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danielbachhuber danielbachhuber deleted the 1899-verify-md5 branch Feb 9, 2016

@szepeviktor

This comment has been minimized.

Copy link
Contributor

commented on 0566eb4 Feb 9, 2016

😢 But substr() returns a string...

This comment has been minimized.

Copy link
Contributor

replied Feb 9, 2016

'20' !==

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.