[!!!][SECURITY] Allow first install only with FIRST_INSTALL file
[Packages/TYPO3.CMS.git] / typo3 / sysext / install / Classes / Controller / AjaxController.php
index 1fd1374..74087fd 100644 (file)
@@ -65,7 +65,7 @@ class AjaxController extends AbstractController {
                $this->initializeObjectManager();
                // Warning: Order of these methods is security relevant and interferes with different access
                // conditions (new/existing installation). See the single method comments for details.
-               $this->checkInstallToolEnabled();
+               $this->outputInstallToolNotEnabledMessageIfNeeded();
                $this->checkInstallToolPasswordNotSet();
                $this->initializeSession();
                $this->checkSessionToken();
@@ -79,13 +79,9 @@ class AjaxController extends AbstractController {
         *
         * @return void
         */
-       protected function checkInstallToolEnabled() {
-               if (is_dir(PATH_typo3conf)) {
-                       /** @var \TYPO3\CMS\Install\Service\EnableFileService $installToolEnableService */
-                       $installToolEnableService = $this->objectManager->get('TYPO3\\CMS\\Install\\Service\\EnableFileService');
-                       if (!$installToolEnableService->checkInstallToolEnableFile()) {
-                               $this->output($this->unauthorized);
-                       }
+       protected function outputInstallToolNotEnabledMessageIfNeeded() {
+               if (!$this->isInstallToolAvailable()) {
+                       $this->output($this->unauthorized);
                }
        }