Actions
Bug #86356
closedChecking $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] should be disabled when running initial setup wizard
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-09-23
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Steps to reproduce:
- Install TYPO3 according to https://docs.typo3.org/typo3cms/InstallationGuide/QuickInstall/Composer/Index.html in a webserver that is proxied by a reverse proxy that terminates SSL.
- "Hit the start page of your freshly created site with your browser and you should see the "thank you for downloading"-message."
Error:
2018/09/23 10:36:42 [error] 14#14: *43 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The current host header value does not match the configured trusted hosts pattern! Check the pattern defined in $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] and adapt it, if you want to allow the current host header 'www.xyz.local' for your installation. in /var/www/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php:2803
But this is not possible, as there is no LocalConfiguration.php yet and the AdditionalConfiguration.php seems to be ignored at this time. The only way to get the setup wizard running is commenting
if (!static::isAllowedHostHeaderValue($retVal)) { throw new \UnexpectedValueException( 'The current host header value does not match the configured trusted hosts pattern! Check the pattern defined in $GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'trustedHostsPattern\'] and adapt it, if you want to allow the current host header \'' . $retVal . '\' for your installation.', 1396795884 ); }
in GeneralUtility.php
and
$defaultPort = GeneralUtility::getIndpEnv('TYPO3_SSL') ? '443' : '80'; $this->messageQueue->enqueue(new FlashMessage( 'The trusted hosts pattern will be configured to allow all header values. This is because your $SERVER_NAME:[defaultPort]' . ' is "' . $_SERVER['SERVER_NAME'] . ':' . $defaultPort . '" while your HTTP_HOST:SERVER_PORT is "' . $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'] . '". Check the pattern defined in Admin' . ' Tools -> Settings -> Configure Installation-Wide Options -> System -> trustedHostsPattern' . ' and adapt it to expected host value(s).', 'Trusted hosts pattern mismatch', FlashMessage::ERROR ));
in SetupCheck.php temporarily. Therefore, this check should be disabled during the initial setup.
Actions