Use Symfony\Component\HttpFoundation\IpUtils

Created on 26 June 2024, 6 months ago

Problem/Motivation

Currently the wildcard system doesn't work well for subnets.

Steps to reproduce

The problem with the wildcard system is it does not reflect how a subnet behaves. So in the case of having a network of 10.100.5.16/28 it's impossible to white this range. The closest you get is 10.100.5.* but this incorrectly whitelists 10.100.5.255 and 10.100.5.0 which reside on a different subnet.

Proposed resolution

Use Symfony\Component\HttpFoundation\IpUtils::checkIp(). This fully supports all the necessary IPv4 and IPv6 netmask representations.

Remaining tasks

Swap out the comparison code for the upstream library

User interface changes

None

API changes

None

Data model changes

None

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom Driskell

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024