[!!!][BUGFIX] Severe data-loss on workspaces publishing action 21/45321/6
authorOliver Hader <oliver@typo3.org>
Wed, 16 Dec 2015 19:12:42 +0000 (20:12 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 17 Dec 2015 22:21:15 +0000 (23:21 +0100)
commit72bf7473242e28357de3c7823158f3f60fb02f94
tree1f0bc52d1d9b9ec2e110e2e122951ef1e2cca55a
parent48db3bf3a9471bd742e24d6031e0d2ba37834832
[!!!][BUGFIX] Severe data-loss on workspaces publishing action

If pages records in a given scenario are published this causes
a severe data-loss for the whole TYPO3 installation since all
records are deleted. Actually they are marked as deleted, but
that's not less problematic.

The scenario for this in a draft workspace is having reordered
sub-pages (move-placeholder) and a parent-page that is marked
for deletion. On publishing the parent-page, the delete process
iterates over all pages on the root-level due to some essential
missing checks and an implicit type-cast from null to interger
zero (0) on the pages.pid value.

The accordant places are validated now. In addition to that the
possibility to delete everything implicitly from the root-page
is disabled to prevent other programmatic flaws like this.

Resolves: #72273
Releases: master, 6.2
Change-Id: I175f220cc0939124e34713fff07685ba902ad385
Reviewed-on: https://review.typo3.org/45321
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/createPlaceholdersAndDeleteDraftParentPage.csv
typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/createPlaceholdersAndDeleteDraftParentPage.csv