Bug #86356
closedChecking $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] should be disabled when running initial setup wizard
100%
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.
Updated by Jonas Eberle over 5 years ago
- Related to Bug #88846: Install tool (on FIRST_INSTALL) warns about "Trusted hosts pattern mismatch" although 'trustedHostsPattern' is set correctly (if no LocalConfiguration.php is present) added
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61374
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61374
Updated by Gerrit Code Review over 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61374
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61363
Updated by Anonymous over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9d7d35d5421a50e358e7a32dcdf9c0332a6e6c56.
Updated by Garvin Hicking 6 months ago
- Related to Bug #103959: TYPO3 fresh installation in DDEV routing context fails on Trusted Hosts Pattern Mismatch added