Bug #89788

Scheduler task for IP anonymization exclusion

Added by Stefan Berger 11 days ago. Updated 2 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2019-11-27
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

in the scheduler task for IP anonymization (TYPO3\CMS\Scheduler\Task\IpAnonymizationTask) only and always the masked IP addresses for the last 2 bytes are excluded.

The exclusion has to be dynamic concerning the defined selection. The problem exists in the TYPO3 Version 7, 8 and 9.

The fix could be as following:

...
            if ($this->mask == 2) {
                $notLikeMaskPattern = '%.0.0';
            } else {
                $notLikeMaskPattern = '%.0';
            }
...
                    $queryBuilder->expr()->notLike(
                        $configuration['ipField'],
                        $queryBuilder->createNamedParameter($notLikeMaskPattern, \PDO::PARAM_STR)
                    ),
...

Thanks for fixing.

Regards.

History

#1 Updated by Riccardo De Contardi 2 days ago

  • Category set to scheduler

Also available in: Atom PDF