Security Advisories (1)
CVE-2021-47156 (2024-03-18)

The Net::IPAddress::Util module before 5.000 for Perl does not properly consider extraneous zero characters in an IP address string, which (in some situations) allows attackers to bypass access control that is based on IP addresses.

NAME

Net::IPAddress::Util::Collection - A collection of Net::IPAddress::Util::Range objects

VERSION

Version 3.017

SYNOPSIS

use Net::IPAddress::Util::Collection;

my $collection = Net::IPAddress::Util::Collection->new();

while (<>) {
    last unless $_;
    push @$collection, $_;
}

print join ', ', $collection->tight()->as_ranges();

DESCRIPTION

CLASS METHODS

new

Create a new object.

OBJECT METHODS

sorted

Return a clone of this object, sorted ascendingly by IP address.

compacted

Return a clone of this object, sorted ascendingly by IP address, with adjacent ranges combined together.

tight

Return a clone of this object, compacted and split into tight ranges. See Net::IPAddress::Util::Range for an explanation of "tight" in this context.

as_ranges

Stringification for (x .. y) style ranges.

as_cidrs

Stringification for CIDR-style strings.

as_netmasks

Stringification for Netmask-style strings.

GLOBAL VARIABLES

$Net::IPAddress::Util::Collection::RADIX_THRESHOLD

If set to any defined value (including zero), collections with more than $RADIX_THRESHOLD elements will be sorted using the radix sort algorithm, which can be faster than Perl's native sort for large data sets. The default value is undef().