Fix Block::newLoad for IPv6 range blocks - follow-up to Ie8bebd8
authorThalia <thalia.e.chan@googlemail.com>
Wed, 8 May 2019 17:49:18 +0000 (12:49 -0500)
committerThalia <thalia.e.chan@googlemail.com>
Wed, 8 May 2019 18:22:46 +0000 (13:22 -0500)
commit5f8e8bc70891bd08fceac3e25565a0f78e4129c7
treee598bbeccfe6796fdf3e1d944f392f0350ef80a6
parent253c9b475f7e81bb8e23dbcd3d2dd8740a8b218d
Fix Block::newLoad for IPv6 range blocks - follow-up to Ie8bebd8

Previously, the size of the range is calculated by finding the
difference between that start and end addresses, converted into
decimal. This fails when the numbers are too large.

Instead, use parsing methods from IP class to avoid having to
handle large numbers.

Bug: T222246
Change-Id: If466139c42c4ac832a9506c80bdb228e9da39638
includes/Block.php
tests/phpunit/includes/BlockTest.php