Describe the bug
We noticed that since release 7.1 (cc6a005 to be precise) an IpAddressMatcher for an IPv6 address will crash with ArrayIndexOutOfBoundsException when trying to match IPv4 address 0.0.0.0.
It is easy to fix this and return to the behavior before 7.1.
To Reproduce
very simple:
var matcher= new IpAddressMatcher("::1/128");
var result = machter.matches("0.0.0.0");
// java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4
Expected behavior
No exception. Result should be false.
Sample
See above
I will submit a PR with regression test.
Describe the bug
We noticed that since release 7.1 (cc6a005 to be precise) an
IpAddressMatcherfor an IPv6 address will crash withArrayIndexOutOfBoundsExceptionwhen trying to match IPv4 address0.0.0.0.It is easy to fix this and return to the behavior before 7.1.
To Reproduce
very simple:
Expected behavior
No exception. Result should be
false.Sample
See above
I will submit a PR with regression test.