[!!!][BUGFIX] Severe data-loss on workspaces publishing action 20/45320/4
authorOliver Hader <oliver@typo3.org>
Wed, 16 Dec 2015 18:58:39 +0000 (19:58 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 17 Dec 2015 22:21:36 +0000 (23:21 +0100)
commitb2b531cf10cb5fa817148df765bbb37ff20a1ce6
tree6032a1aef1588bffa7c38532d0f8d30d6ed0ff45
parentf1c4c1782419c7c3913b01c2b5f854753ddc599b
[!!!][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/45320
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