src/wp-includes/Requests/SSL.php 1 location
|
@@ 141-148 (lines=8) @@
|
| 138 |
|
// Calculate the valid wildcard match if the host is not an IP address |
| 139 |
|
// Also validates that the host has 3 parts or more, as per Firefox's |
| 140 |
|
// ruleset. |
| 141 |
|
if (ip2long($host) === false) { |
| 142 |
|
$parts = explode('.', $host); |
| 143 |
|
$parts[0] = '*'; |
| 144 |
|
$wildcard = implode('.', $parts); |
| 145 |
|
if ($wildcard === $reference) { |
| 146 |
|
return true; |
| 147 |
|
} |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
return false; |
| 151 |
|
} |
src/wp-includes/class-requests.php 1 location
|
@@ 970-976 (lines=7) @@
|
| 967 |
|
// Also validates that the host has 3 parts or more, as per Firefox's |
| 968 |
|
// ruleset. |
| 969 |
|
$parts = explode('.', $host); |
| 970 |
|
if (ip2long($host) === false && count($parts) >= 3) { |
| 971 |
|
$parts[0] = '*'; |
| 972 |
|
$wildcard = implode('.', $parts); |
| 973 |
|
if ($wildcard === $reference) { |
| 974 |
|
return true; |
| 975 |
|
} |
| 976 |
|
} |
| 977 |
|
|
| 978 |
|
return false; |
| 979 |
|
} |