[BUGFIX] Avoid race conditions in typo3temp/Cache 95/39895/7
authorBernhard Kraft <kraft@webconsulting.at>
Tue, 2 Jun 2015 13:19:23 +0000 (15:19 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Thu, 25 Jun 2015 15:37:40 +0000 (17:37 +0200)
commite1fdbbba6a00f810bf275b199afbbfb31f563367
treecd916c13c43db296fd330ff38d6e4bf354a42811
parente8ed378be475f68c77772719b7361f09ab159e57
[BUGFIX] Avoid race conditions in typo3temp/Cache

Race conditions can occur when the cache in typo3temp/Cache gets
cleared, for example by using the Install Tool "Clear all caches"
button. The cache is currently cleared using GeneralUtility::rmdir()
which does a directory traversal and unlinks all contained files.
Instead GeneralUtility::flushDirectory() should get used. This method
renames the directory into a temp-dir name and then removes the temp-dir
using GeneralUtility:rmdir().

Change-Id: I23f31da4e7b1730edee9007e713a51d4b39c6f1c
Resolves: #67238
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/39895
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/install/Classes/Service/ClearCacheService.php