Repository navigation
Releases
Releases · divinity76/cloudflare-ip-validator
v1.0.1
Fixed
- 32-bit PHP: IPv4 ranges from 128.0.0.0 upwards were rejected because
ip2long()returns signed values there. 32-bit builds now use a byte-wise fallback; 64-bit behaviour is unchanged.
Performance
- IPv4 validation is ~2.4–2.8x faster. Generated checks dispatch on the first IPv4 octet / first IPv6 byte instead of walking every CIDR, so non-Cloudflare addresses stop at a single lookup (PHP 8.5, no opcache; 2.8x on non-CF IPv4, 2.4x on mixed traffic).
php tools/update-cloudflare-ip-validator.phpno longer rewrites the class when Cloudflare's API ETag is unchanged (--forceoverrides).
Internal
- The generator now handles IPv6 prefixes whose first byte is an ASCII digit (
0–9). - Removed the stale
ext-filtersuggestion fromcomposer.json.