Skip to content

Commit

Permalink
fix(tests): Add IpAddressClassifier v6 zone ID test
Browse files Browse the repository at this point in the history
Signed-off-by: Josh <josh.t.richards@gmail.com>
  • Loading branch information
joshtrichards committed Nov 7, 2024
1 parent 7ff1654 commit fa17ed6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

0 comments on commit fa17ed6

Please sign in to comment.