Changeset 50842 for trunk/src/wp-includes/Requests/SSL.php
- Timestamp:
- 05/11/2021 07:40:41 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/Requests/SSL.php
r48121 r50842 21 21 * Unfortunately, PHP doesn't check the certificate against the alternative 22 22 * names, leading things like 'https://www.github.com/' to be invalid. 23 * Instead24 23 * 25 24 * @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1 … … 31 30 */ 32 31 public static function verify_certificate($host, $cert) { 33 // Calculate the valid wildcard match if the host is not an IP address34 $parts = explode('.', $host);35 if (ip2long($host) === false) {36 $parts[0] = '*';37 }38 $wildcard = implode('.', $parts);39 40 32 $has_dns_alt = false; 41 33 … … 140 132 // ruleset. 141 133 if (ip2long($host) === false) { 142 $parts = explode('.', $host);134 $parts = explode('.', $host); 143 135 $parts[0] = '*'; 144 136 $wildcard = implode('.', $parts);
Note: See TracChangeset
for help on using the changeset viewer.