Fix Block::newLoad for IPv6 range blocks
authorThalia <thalia.e.chan@googlemail.com>
Fri, 8 Mar 2019 23:08:09 +0000 (23:08 +0000)
committerThalia <thalia.e.chan@googlemail.com>
Thu, 2 May 2019 16:07:55 +0000 (17:07 +0100)
commitf01cac1d17b5814bda595b2854c403164f5577ef
tree095592b825086f46970f0fa539f59ef39928f1cc
parentb942fc27c93e54868298608698fe6b965907d33e
Fix Block::newLoad for IPv6 range blocks

If Block::newLoad finds multiple IP range blocks, the block with the narrowest
range is chosen. In order to determine this, the start and end of the range are
converted to decimal. Prior to this patch, this does not work for IPv6 because
the converter does not handle the 'v6-' prefix on IPv6 addresses, so remove
this.

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