[BUGFIX] Fix redirect to install tool in new installations 76/30376/6
authorMarkus Klein <klein.t3@mfc-linz.at>
Sat, 24 May 2014 18:45:17 +0000 (20:45 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 29 May 2014 13:39:47 +0000 (15:39 +0200)
When setting up a new TYPO3 installation, TYPO3 should redirect
to the install tool, when accessing the frontend or backend.

This redirect fails since introduction of the trustedHostsPattern
since no configuration is available at this point, while the
request itself is a BE or FE request, which will be denied in this
case.
Solution is to set the REQUEST_TYPE to INSTALL before doing the redirect
to install tool so that creating the redirect is allowed.

Resolves: #59087
Releases: 6.2, 6.1
Change-Id: I31bcbc20fa1c9bca0d6bf2b940bf26b9affe893b
Reviewed-on: https://review.typo3.org/30376
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/core/Classes/Core/Bootstrap.php

index 516dd8e..e35c907 100644 (file)
@@ -171,6 +171,8 @@ class Bootstrap {
                $configurationManager = new \TYPO3\CMS\Core\Configuration\ConfigurationManager;
                $this->setEarlyInstance('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager', $configurationManager);
                if (!file_exists($configurationManager->getLocalConfigurationFileLocation()) || !file_exists(PATH_typo3conf . 'PackageStates.php')) {
+                       define('TYPO3_enterInstallScript', '1');
+                       $this->defineTypo3RequestTypes();
                        require_once __DIR__ . '/../Utility/HttpUtility.php';
                        Utility\HttpUtility::redirect($pathUpToDocumentRoot . 'typo3/sysext/install/Start/Install.php');
                }