aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Security
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Security')
-rw-r--r--lib/private/Security/Normalizer/IpAddress.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Security/Normalizer/IpAddress.php b/lib/private/Security/Normalizer/IpAddress.php
index e9232c5fe9f..6ef8763f6d9 100644
--- a/lib/private/Security/Normalizer/IpAddress.php
+++ b/lib/private/Security/Normalizer/IpAddress.php
@@ -24,7 +24,7 @@ class IpAddress {
}
/**
- * Return the given subnet for an IPv6 address (64 first bits)
+ * Return the given subnet for an IPv6 address (48 first bits)
*/
private function getIPv6Subnet(string $ip): string {
if ($ip[0] === '[' && $ip[-1] === ']') { // If IP is with brackets, for example [::1]
@@ -36,9 +36,9 @@ class IpAddress {
}
$binary = \inet_pton($ip);
- $mask = inet_pton('FFFF:FFFF:FFFF:FFFF::');
+ $mask = inet_pton('FFFF:FFFF:FFFF::');
- return inet_ntop($binary & $mask) . '/64';
+ return inet_ntop($binary & $mask) . '/48';
}
/**
@@ -63,7 +63,7 @@ class IpAddress {
/**
- * Gets either the /32 (IPv4) or the /64 (IPv6) subnet of an IP address
+ * Gets either the /32 (IPv4) or the /48 (IPv6) subnet of an IP address
*/
public function getSubnet(): string {
if (filter_var($this->ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {