More specific IP ranges should be matched before broader ones

Created on 23 January 2013, over 12 years ago
Updated 25 November 2024, 5 months ago

I'm using IP Login for a private network, and in general it works fine. But one aspect is causing me trouble, and that is that you can't reliably use overlapping IP ranges for different users.

I have a user with some very basic rights that should be assigned to everyone on the private network with a few exceptions. Some users need more rights, and should be logged in on a separate user. If I only want to use IP addresses for login, this gets unmaintainable quickly, as I have to change the broad IP range every single time I add another account with a single IP.

It would be far easier if I could define overlapping IP ranges and IP Login would always use the more specific one. For example, if I had the following ranges:

User A: 192.168.*.*
User B: 192.168.1.2

then if I access the site from 192.168.1.2, it should log me in as User B, even though my IP fits both ranges. Just sorting the IP ranges by the number of IPs they contain should be enough, so that ranges with only one IP would always be checked first.

Feature request
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇩🇪Germany DoctorWho

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

Comments & Activities

Production build 0.71.5 2024