diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-11-22 14:01:41 +0100 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-11-22 14:10:11 +0100 |
commit | 7e08a4ab157b2be82c286c65ae18fa9199aeba80 (patch) | |
tree | f7e90267f2c2462f5b9b956568b3d51c9d3fbf9e /lib/private/Security | |
parent | 68fecc1d9f6810e815c6a6ba80d4c13a0bde98b8 (diff) | |
download | nextcloud-server-7e08a4ab157b2be82c286c65ae18fa9199aeba80.tar.gz nextcloud-server-7e08a4ab157b2be82c286c65ae18fa9199aeba80.zip |
Fix getting subnet of ipv4 mapped ipv6 addresses
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/private/Security')
-rw-r--r-- | lib/private/Security/Normalizer/IpAddress.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/Security/Normalizer/IpAddress.php b/lib/private/Security/Normalizer/IpAddress.php index 705235413e4..656487d8ce4 100644 --- a/lib/private/Security/Normalizer/IpAddress.php +++ b/lib/private/Security/Normalizer/IpAddress.php @@ -103,6 +103,8 @@ class IpAddress { $this->ip, 32 ); + } elseif (substr(strtolower($this->ip), 0, 7) === '::ffff:') { + return '::ffff:' . $this->getIPv4Subnet(substr($this->ip, 7), 32); } return $this->getIPv6Subnet( $this->ip, |