Bug #77781
closedurl_scheme redirect doesn't work with TYPO3_SSL
100%
Description
If you have a Website behind a proxy like Varnish and every connection goes to TYPO3 with http://. The scheme based redirect will not work, even if TYPO3 recognizes the connection as a HTTPS, beacuse the TYPO3_SSL enviroment variable is not used.
The problem is the test ist based only on the requested schema.
TypoScriptFrontendController.php:1466
if ((int)$this->page['url_scheme'] === HttpUtility::SCHEME_HTTP && $requestUrlScheme == 'https') { $newUrl = 'http://' . substr(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'), 8); } elseif ((int)$this->page['url_scheme'] === HttpUtility::SCHEME_HTTPS && $requestUrlScheme == 'http') { $newUrl = 'https://' . substr(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'), 7); }
It should be something like that:
if ((int)$this->page['url_scheme'] === HttpUtility::SCHEME_HTTP && GeneralUtility::getIndpEnv('TYPO3_SSL') === TRUE) { $newUrl = 'http://' . substr(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'), 8); } elseif ((int)$this->page['url_scheme'] === HttpUtility::SCHEME_HTTPS && GeneralUtility::getIndpEnv('TYPO3_SSL') === FALSE) { $newUrl = 'https://' . substr(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'), 7); }
I found this in 6.2, but it is the same in 8.4-dev
Updated by Gerrit Code Review about 8 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/49752
Updated by Gerrit Code Review about 8 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/49752
Updated by Gerrit Code Review almost 8 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/49752
Updated by Anonymous almost 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 88bdb122e32f40cab60cc06b083db468ddd99e95.