[BUGFIX] Localization State does not properly sanitize and enrich 22/54422/3
authorOliver Hader <oliver@typo3.org>
Tue, 17 Oct 2017 20:59:31 +0000 (22:59 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 17 Oct 2017 22:47:20 +0000 (00:47 +0200)
commit85836c4cd37833e412bd2c215b6128c03898dfb7
treecedd3384b013b1e625fb8701b64cac22fb479f67
parentcb1e38e18817cfc664c4a1a9e44c704d9941d5c3
[BUGFIX] Localization State does not properly sanitize and enrich

The Localization State object has an incomplete assignment in the
constructor - sanitize processing is overridden by enrich processing,
however both should be combined instead.

The current side-effects were, that
* localization state could contain fields that were not defined in TCA
  having support for the `allowLanguageSynchronization` setting
* state values different than `custom`, `source` or `parent` have not
  been overridden by the default `parent` value

Resolves: #82793
Releases: 8.7, master
Change-Id: I25e794736df216b17a5b8de3bc5203bd18ee9694
Reviewed-on: https://review.typo3.org/54422
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/DataHandling/Localization/State.php
typo3/sysext/core/Tests/Unit/DataHandling/Localization/StateTest.php [new file with mode: 0644]