diff options
-rw-r--r-- | lib/private/Security/Ip/Range.php | 2 | ||||
-rw-r--r-- | tests/lib/Net/IpAddressClassifierTest.php | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Security/Ip/Range.php b/lib/private/Security/Ip/Range.php index 4aac3956155..6c8aae4575a 100644 --- a/lib/private/Security/Ip/Range.php +++ b/lib/private/Security/Ip/Range.php @@ -31,7 +31,7 @@ class Range implements IRange { } public function contains(IAddress $address): bool { - return $this->range->contains(Factory::parseAddressString((string) $address)); + return $this->range->contains(Factory::parseAddressString((string) $address, ParseStringFlag::MAY_INCLUDE_ZONEID)); } public function __toString(): string { diff --git a/tests/lib/Net/IpAddressClassifierTest.php b/tests/lib/Net/IpAddressClassifierTest.php index 616a6872bdb..803be00f740 100644 --- a/tests/lib/Net/IpAddressClassifierTest.php +++ b/tests/lib/Net/IpAddressClassifierTest.php @@ -43,6 +43,7 @@ class IpAddressClassifierTest extends TestCase { return [ ['192.168.0.1'], ['fe80::200:5aee:feaa:20a2'], + ['fe80::1fc4:15d8:78db:2319%enp4s0'], // v6 zone ID ['0:0:0:0:0:ffff:10.0.0.1'], ['0:0:0:0:0:ffff:127.0.0.0'], ['10.0.0.1'], |