diff --git src/wp-admin/includes/update.php src/wp-admin/includes/update.php
index 33325236e3..e67f7c068b 100644
|
|
|
function find_core_auto_update() { |
| 129 | 129 | * @return array|false An array of checksums on success, false on failure. |
| 130 | 130 | */ |
| 131 | 131 | function get_core_checksums( $version, $locale ) { |
| 132 | | $http_url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), '', '&' ); |
| 133 | | $url = $http_url; |
| | 132 | $checksum_file = ABSPATH . 'wp-content/uploads/checksum/checksum.md5'; |
| 134 | 133 | |
| 135 | | $ssl = wp_http_supports( array( 'ssl' ) ); |
| 136 | | |
| 137 | | if ( $ssl ) { |
| 138 | | $url = set_url_scheme( $url, 'https' ); |
| | 134 | if ( ! file_exists( $checksum_file ) ) { |
| | 135 | return false; |
| 139 | 136 | } |
| | 137 | $file_contents = file_get_contents( $checksum_file ); |
| 140 | 138 | |
| 141 | | $options = array( |
| 142 | | 'timeout' => wp_doing_cron() ? 30 : 3, |
| 143 | | ); |
| | 139 | if ( false === $file_contents ) { |
| | 140 | return false; |
| | 141 | } |
| 144 | 142 | |
| 145 | | $response = wp_remote_get( $url, $options ); |
| 146 | | |
| 147 | | if ( $ssl && is_wp_error( $response ) ) { |
| 148 | | wp_trigger_error( |
| 149 | | __FUNCTION__, |
| 150 | | sprintf( |
| 151 | | /* translators: %s: Support forums URL. */ |
| 152 | | __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), |
| 153 | | __( 'https://wordpress.org/support/forums/' ) |
| 154 | | ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), |
| 155 | | headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE |
| 156 | | ); |
| | 143 | $lines = explode( "\n", trim( $file_contents ) ); |
| | 144 | $checksums = array(); |
| 157 | 145 | |
| 158 | | $response = wp_remote_get( $http_url, $options ); |
| 159 | | } |
| | 146 | foreach ( $lines as $line ) { |
| | 147 | $line = trim( $line ); |
| 160 | 148 | |
| 161 | | if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) { |
| 162 | | return false; |
| 163 | | } |
| | 149 | if ( empty( $line ) ) { |
| | 150 | continue; |
| | 151 | } |
| 164 | 152 | |
| 165 | | $body = trim( wp_remote_retrieve_body( $response ) ); |
| 166 | | $body = json_decode( $body, true ); |
| | 153 | $parts = preg_split( '/\s+/', $line, 2 ); |
| 167 | 154 | |
| 168 | | if ( ! is_array( $body ) || ! isset( $body['checksums'] ) || ! is_array( $body['checksums'] ) ) { |
| 169 | | return false; |
| | 155 | if ( count( $parts ) === 2 ) { |
| | 156 | $hash = $parts[0]; |
| | 157 | $filename = $parts[1]; |
| | 158 | $filename = ltrim( $filename, './' ); |
| | 159 | $checksums[ $filename ] = $hash; |
| | 160 | } |
| 170 | 161 | } |
| 171 | 162 | |
| 172 | | return $body['checksums']; |
| | 163 | return $checksums; |
| 173 | 164 | } |
| 174 | 165 | |
| 175 | 166 | /** |
diff --git src/wp-includes/version.php src/wp-includes/version.php
index 324ee3279f..e3f3195bde 100644
|
|
|
|
| 16 | 16 | * |
| 17 | 17 | * @global string $wp_version |
| 18 | 18 | */ |
| 19 | | $wp_version = '6.9-alpha-60093-src'; |
| | 19 | $wp_version = '6.8.2'; |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. |