Bug #89788

Scheduler task for IP anonymization exclusion

Added by Stefan Berger 6 months ago. Updated 3 months ago.

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

100%

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.

Associated revisions

Revision 9323dc5a (diff)
Added by Guido Schmechel 3 months ago

[BUGFIX] Task for IP anonymization respects mask

IP anonymization now takes the correct pattern when querying the database.
Depending on the mask to be shortened.

Resolves: #89788
Releases: master, 9.5
Change-Id: Ic09d2385b33434cc2d7553087c2014b190f9c339
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62992
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Tested-by: Georg Ringer <>
Reviewed-by: Benni Mack <>
Reviewed-by: Georg Ringer <>

Revision 7c94866a (diff)
Added by Guido Schmechel 3 months ago

[BUGFIX] Task for IP anonymization respects mask

IP anonymization now takes the correct pattern when querying the database.
Depending on the mask to be shortened.

Resolves: #89788
Releases: master, 9.5
Change-Id: Ic09d2385b33434cc2d7553087c2014b190f9c339
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63225
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Reviewed-by: Georg Ringer <>

History

#1 Updated by Riccardo De Contardi 6 months ago

  • Category set to scheduler

#2 Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62992

#3 Updated by Gerrit Code Review 4 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62992

#4 Updated by Gerrit Code Review 3 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63225

#5 Updated by Guido Schmechel 3 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Benni Mack 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF