Make WordPress Core


Ignore:
Timestamp:
05/11/2021 07:40:41 PM (6 years ago)
Author:
desrosj
Message:

External Libraries: Update the Requests library to version 1.8.0.

While some of the changes in the 1.8.0 release have already been copied to WordPress Core in earlier releases (see [38727], [46258], [47902] and [49382]), this release contains additional improvements, including:

  • A significant performance fix when using cURL.
  • Improved compliance with RFC2616.

The library has also been moved under the WordPress project’s GitHub organization and can now be found at ​https://github.com/WordPress/Requests.

Props jrf, dd32, rmccue, justinahinon, netweb, schlessera, TimothyBJacobs, soulseekah, ozh, skithund, carlalexander, travisnorthcutt, desrosj.
Fixes #53101.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/Requests/SSL.php

    r48121 r50842  
    2121         * Unfortunately, PHP doesn't check the certificate against the alternative
    2222         * names, leading things like 'https://www.github.com/' to be invalid.
    23          * Instead
    2423         *
    2524         * @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1
    … …  
    3130         */
    3231        public static function verify_certificate($host, $cert) {
    33                 // Calculate the valid wildcard match if the host is not an IP address
    34                 $parts = explode('.', $host);
    35                 if (ip2long($host) === false) {
    36                         $parts[0] = '*';
    37                 }
    38                 $wildcard = implode('.', $parts);
    39 
    4032                $has_dns_alt = false;
    4133
    … …  
    140132                // ruleset.
    141133                if (ip2long($host) === false) {
    142                         $parts = explode('.', $host);
     134                        $parts    = explode('.', $host);
    143135                        $parts[0] = '*';
    144136                        $wildcard = implode('.', $parts);
Note: See TracChangeset for help on using the changeset viewer.