Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(tests): Add IpAddressClassifier v6 zone ID test
Signed-off-by: Josh <[email protected]>
  • Loading branch information
joshtrichards committed Nov 7, 2024
commit fa17ed6fb4401ea991843275773ac521e5271a54
2 changes: 1 addition & 1 deletion lib/private/Security/Ip/Range.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static function isValid(string $range): bool {
}

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 {
Expand Down
1 change: 1 addition & 0 deletions tests/lib/Net/IpAddressClassifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function localIpAddressData(): array {
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'],
Expand Down