Page MenuHomePhabricator

How to determine if an IP range is beyond $wgBlockCIDRLimit
Open, Needs TriagePublic

Description

With T206954 being (partially) implemented, scripts and tools making use of wgRelevantUserName for IP ranges may need to be wary of ranges larger than the CIDR limit, so is there a way to determine if a given range is larger than the limit, or should users be rolling their own?

It'd be useful, especially since, as far as I can tell, the definitions in $wgBlockCIDRLimit aren't available from the API (meta=siteinfo is what I expected?), so those values would have to be looked up and hardcoded ahead of time.