Project

General

Profile

Actions

Bug #90059

closed

PHP-Error in IpAnonymizationUtility.php

Added by Michael Sollmann almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2020-01-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

If the processed IP addresses in IpAnonymizationUtility are not in the correct form, TYPO3 throws an uncaught exception:

Uncaught TYPO3 Exception strlen() expects parameter 1 to be string, boolean given
thrown in file [...]/typo3/sysext/core/Classes/Utility/IpAnonymizationUtility.php
in line 76

It is because the preceding inet_pton() returns false if the addresses are syntactically incorrect:

$packedAddress = inet_pton($address);
$length = strlen($packedAddress);

Actions

Also available in: Atom PDF