From 6dd9f1aeb2a334bb76fe2d014c88c40192540d4c Mon Sep 17 00:00:00 2001
From: Andreas Fernandez <a.fernandez@scripting-base.de>
Date: Tue, 22 May 2018 11:44:55 +0200
Subject: [PATCH] [BUGFIX] Add SYS/ipAnonymization to DefaultConfiguration

Resolves: #85060
Related: #84053
Releases: master, 9.2, 8.7, 7.6
Change-Id: I04dba093dc8e423adbf75e2198c31e5c013864cb
Reviewed-on: https://review.typo3.org/57027
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
---
 typo3/sysext/core/Configuration/DefaultConfiguration.php   | 1 +
 .../Configuration/DefaultConfigurationDescription.yaml     | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/typo3/sysext/core/Configuration/DefaultConfiguration.php b/typo3/sysext/core/Configuration/DefaultConfiguration.php
index 125344443588..14de28826933 100644
--- a/typo3/sysext/core/Configuration/DefaultConfiguration.php
+++ b/typo3/sysext/core/Configuration/DefaultConfiguration.php
@@ -207,6 +207,7 @@ return [
         'belogErrorReporting' => E_ALL & ~(E_STRICT | E_NOTICE),
         'locallangXMLOverride' => [], // For extension/overriding of the arrays in 'locallang' files in frontend  and backend. See 'Inside TYPO3' for more information.
         'generateApacheHtaccess' => 1,
+        'ipAnonymization' => 1,
         'Objects' => [],
         'fal' => [
             'registeredDrivers' => [
diff --git a/typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml b/typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml
index a0b2005dc16c..0511cea9c830 100644
--- a/typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml
+++ b/typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml
@@ -201,6 +201,13 @@ SYS:
         generateApacheHtaccess:
             type: bool
             description: 'TYPO3 can create <em>.htaccess</em> files which are used by Apache Webserver. They are useful for access protection or performance improvements. Currently <em>.htaccess</em> files in the following directories are created, if they do not exist: <ul><li>typo3temp/compressor/</li></ul>You want to disable this feature, if you are not running Apache or want to use own rulesets.'
+        ipAnonymization:
+            type: int
+            allowedValues:
+              '0': 'Disabled - Do not modify IP addresses at all'
+              '1': 'Mask the last byte for IPv4 addresses / Mask the Interface ID for IPv6 addresses (default)'
+              '2': 'Mask the last two bytes for IPv4 addresses / Mask the Interface ID and SLA ID for IPv6 addresses'
+            description: 'Configures if and how IP addresses stored via TYPO3''s API should be anonymized ("masked") with a zero-numbered replacement.'
         systemMaintainers:
             type: array
             description: 'A list of backend user IDs allowed to access the Install Tool'
-- 
GitLab