Skip to content

IpHelper does not detect invalid IP addresses #32

@nibra

Description

@nibra

Steps to reproduce the issue

use Joomla\Utilities\IpHelper;

// Prepare SERVER array
$_SERVER['REMOTE_ADDR'] = 'fake';

// Prepare IpHelper singleton
IpHelper::setAllowIpOverrides(false);
IpHelper::setIp(null);

// Retrieve IP address
echo IpHelper::getIp();

Expected result

Empty string

Actual result

fake

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions