- Affected version
- 2.2.10 PL 1
PHP:
$ips = array_merge(
$data['ipv4s'],
array_map(
function ($ipv6) { return '[' . $ipv6 . ']'; },
$data['ipv6s']
)
);
So
$data['ipv4s']
is a bool here - this seems to happen if the name cannot be resolved using IPv4:
PHP:
public function isRequestableUntrustedUrlExtended($url, &$data = [], &$error = null)
{
[...]
$ips = @gethostbynamel($parts['host']);
if ($ips)
[...]
$data = [
'scheme' => $parts['scheme'],
'host' => $parts['host'],
'port' => $parts['port'] ?? null,
'ipv4s' => $ips,
'ipv6s' => array_column($ipv6s, 'ipv6')
];
return true;
So in case an IPv6 resolution is successful (but IPv4 isn't) the function returns
true
, but ipv4s
remains false
(should be an empty array instead).Btw: Why doesn't this entirely new method have a return type?
Last edited: