Feature #50186
closedpageNotFound_handling should tell about misconfiguration
100%
Description
This is the situation:
$TYPO3_CONF_VARS['SYS']['curlUse'] = '1'; $TYPO3_CONF_VARS['SYS']['curlProxyServer'] = 'mistyped_wwwproxy:81'; $TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '/index.php?id=511
Now a user tries to visit a non existing page.
When cUrl is active but proxy is not set up correctly, server-sided fetching of the 404-Page (and sending that content as 404) fails and TYPO3 redirects via 303 to that url instead. Unfortunatelly without telling anyone (FE user, log, ...) that this is due to a misconfiguration.
1944 // Prepare headers 1945 $headerArr = array( 1946 'User-agent: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT'), 1947 'Referer: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL') 1948 ); 1949 $res = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($code, 1, $headerArr); 1950 // Header and content are separated by an empty line 1951 list($header, $content) = explode(CRLF . CRLF, $res, 2); 1952 $content .= CRLF; 1953 if (FALSE === $res) { 1954 // Last chance -- redirect 1955 \TYPO3\CMS\Core\Utility\HttpUtility::redirect($code);
Reading the forth (opional) parameter $report of the function getUrl could be a possible solution. In my case it returned the message "Couldn't resolve http://mistyped_wwwproxy/" or something like that. Would be nice to find this message in the backend's log module.
Updated by Philipp Gampe over 11 years ago
- Status changed from New to Accepted
I would prefer a more generic solution. If fetching the file/URL returns false
, then an exception should be thrown. This can then be catched by the ExeptionHandler (will both log it and display the message if dev settings are used).
Can you create a patch for this? http://wiki.typo3.org/CWT
Updated by Anonymous over 11 years ago
Philipp Gampe wrote:
I would prefer a more generic solution. If fetching the file/URL returns
false
, then an exception should be thrown.
You mean instead of the "Last chance" redirect?
Updated by Philipp Gampe over 11 years ago
I am not into the code. Will need to take a look ... ping me in a couple of days of nobody else answers.
Updated by Anonymous over 11 years ago
Ping ;-)
Philipp Gampe wrote:
I am not into the code. Will need to take a look ... ping me in a couple of days of nobody else answers.
Updated by Mathias Schreiber almost 10 years ago
- Priority changed from Should have to Could have
- Target version set to 7.2 (Frontend)
- Is Regression set to No
Updated by Mathias Schreiber almost 10 years ago
- Tracker changed from Bug to Feature
Updated by Benni Mack over 9 years ago
- Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack about 9 years ago
- Target version changed from 7.5 to 7 LTS
Updated by Riccardo De Contardi about 7 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Gerrit Code Review about 7 years ago
- Status changed from Accepted 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/54494
Updated by Gerrit Code Review about 7 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/54494
Updated by Gerrit Code Review about 7 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/54494
Updated by Gerrit Code Review about 7 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494
Updated by Gerrit Code Review about 7 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494
Updated by Gerrit Code Review about 7 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494
Updated by Gerrit Code Review almost 7 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494
Updated by Gerrit Code Review almost 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54808
Updated by Markus Klein almost 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset bb87f5d13e747bd3e837c2047c549231f8987201.