#90047BUG with IP6 in IpLocker.php after protokoll switch ipv4 to ipv6
Description
IpLocker.php dose not work with
TYPO3\CMS\Core\Utility\MathUtility\IpLocker
wrong code
public function validateRemoteAddressAgainstSessionIpLock(string $ipAddress, string $sessionIpLock): bool
{
if ($sessionIpLock === static::DISABLED_LOCK_VALUE) {
return true;
}
$ipToCompare = $this->isIpv6Address($sessionIpLock)
? $this->getIpLockPartForIpv6Address($ipAddress)
: $this->getIpLockPartForIpv4Address($ipAddress);
return $ipToCompare === $sessionIpLock;
}
Can only be commperd if same protokoll is used
to fix:
$ipToCompare = $this->isIpv6Address($ipAddress) !!!!!
? $this->getIpLockPartForIpv6Address($ipAddress)
: $this->getIpLockPartForIpv4Address($ipAddress);
But then user will be logged out at protocol switch