From 077eea18b517ef25315c3cb5c8bca8202c12bfa4 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 31 Oct 2024 17:01:34 -0400 Subject: [PATCH] fix(security): Handle IPv6 zone IDs used in link-local addresses Signed-off-by: Josh --- lib/private/Security/Ip/Range.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/Security/Ip/Range.php b/lib/private/Security/Ip/Range.php index 39c03677f8100..e32b7a5abc095 100644 --- a/lib/private/Security/Ip/Range.php +++ b/lib/private/Security/Ip/Range.php @@ -10,6 +10,7 @@ use InvalidArgumentException; use IPLib\Factory; +use IPLib\ParseStringFlag; use IPLib\Range\RangeInterface; use OCP\Security\Ip\IAddress; use OCP\Security\Ip\IRange; @@ -30,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 {