On 01/10/2025 10:16, Mark Thomas wrote:
On 29/09/2025 15:15, Mark Thomas wrote:
On 29/09/2025 14:17, Rémy Maucherat wrote:

<snip/>

It seems there's consensus to phase out the regexp stuff.

It does although we have a bunch of different suggestions on how to do it. We don't need to rush this - so probably not something for the October releases.

I want to find some time to look at the options proposed so far and see if there is a way to migrate from regular expressions to CIDR notation that is minimally disruptive for users.

I think Chris's idea is the way to do this. Autodetect CIDR vs regex using the presence of the '/' character.

This mostly works but it does mean you need to use 1.1.1.1/32 rather than the shortcut 1.1.1.1 which works in 12.0.x. I haven't thought of a reliable way around this yet.
I'll update the PR for the RemoteIP[Filter|Valve] to use this approach.
Done.
I'll document that CIDR is the preferred approach and the regex support is deprecated in 9.0.x -> 11.0.x and will be removed in 12.0.x.

Done for 11.0.x and 12.0.x

I'm going to work on other things for a while to give folks a chance to look at the changes (and to wait for the 10.1.x tag) before back-porting these changes further and looking at the rest of the changes.

Mark

I'll then look at the Remote[Address|Host|CIDR][Filter|Valve]. My current thinking is:

- deprecate the RemoteAddress[Filter|Valve] in favour of the RemoteCIDR[Filter|Valve]
- remove the RemoteAddress[Filter|Valve] in 12.0.x onwards
- Refactor the RemoteHost[Filter|Valve] since there may not be a need
   for the base class any more

I won't commit anything to 10.1.x or 9.0.x until after the October releases have been tagged for that version.

I'll also look to see if there is anywhere else we are using regex with IP addresses and look to migrate that using the same approach as RemoteIP[Filter|Valve].

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to