mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 23:03:00 -04:00
fix(security): Handle IPv6 zone IDs used in link-local addresses
Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
parent
4873dcbf1e
commit
077eea18b5
1 changed files with 2 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue