Allow reserved range in IP whitelist

Created on 15 May 2025, 5 months ago

Problem/Motivation

The IP whitelist form field currently does not validate if you try to add an IP from a reserved range, such as 127.0.0.1. I would like to be able to whitelist 127.0.0.1. My use case is that I am running end-to-end tests of the contact form on the local host (at least while testing the tests). The contact form submissions are coming from 127.0.0.1 in this case (or ::1, until I messed around with /etc/hosts a bit).

Steps to reproduce

Visit the flood control configuration form and try to add "127.0.0.1" to the IP whitelist.

Proposed resolution

Remove the FILTER_FLAG_NO_RES_RANGE from the filter_var() calls in FloodControlSettingsForm.php's validateForm().

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

Feature request
Status

Active

Version

3.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024