diff options
author | Josh <josh.t.richards@gmail.com> | 2024-10-31 17:01:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 17:01:34 -0400 |
commit | 077eea18b517ef25315c3cb5c8bca8202c12bfa4 (patch) | |
tree | 124d7532e12be47dfd2e2d68cf4741974462a8ea /lib/private | |
parent | 4873dcbf1ede48d3a79be9abd997fb0b85d493fb (diff) | |
download | nextcloud-server-077eea18b517ef25315c3cb5c8bca8202c12bfa4.tar.gz nextcloud-server-077eea18b517ef25315c3cb5c8bca8202c12bfa4.zip |
fix(security): Handle IPv6 zone IDs used in link-local addresses
Signed-off-by: Josh <josh.t.richards@gmail.com>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Security/Ip/Range.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Security/Ip/Range.php b/lib/private/Security/Ip/Range.php index 39c03677f81..e32b7a5abc0 100644 --- a/lib/private/Security/Ip/Range.php +++ b/lib/private/Security/Ip/Range.php @@ -10,6 +10,7 @@ namespace OC\Security\Ip; 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 @@ 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 { |