Upgrade/install: fix verification bugs and scale back signature checks.

This fixes several bugs in the signature verification code:
Disables signature checks on certain incompatible PHP versions that cause math errors when opcache is enabled;
Prevents a spurious URL and subsequent error when downloading a zip file with query arguments;
Prevents errors triggered by third-party upgrade scripts as per #46615;
Disables signature tests for Plugins, Themes, and Translations, leaving only core updates.

At the 5.2 release the API servers will only provide signatures for core update packages, which is why messages are suppressed for plugins and other package types. Signatures for those other items will become available later.

Props dd32.
See #39309, #46615



git-svn-id: https://develop.svn.wordpress.org/trunk@45262 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Alex Shiels
2019-04-24 07:43:29 +00:00
parent 361333e7e2
commit 1343858467
3 changed files with 90 additions and 33 deletions
@@ -121,7 +121,7 @@ class Core_Upgrader extends WP_Upgrader {
return new WP_Error( 'locked', $this->strings['locked'] );
}
$download = $this->download_package( $current->packages->$to_download );
$download = $this->download_package( $current->packages->$to_download, true );
// Allow for signature soft-fail.
// WARNING: This may be removed in the future.