Bug #63896
closedclass.tslib_fe: Call to a member function getUrlToCurrentLocation() after Update to TYPO3 4.5.39
100%
Description
In a Multidomain TYPO3 we have the folowing Error:
Fatal error: Call to a member function getUrlToCurrentLocation() on a non-object in [..]/typo3_src-4.5.39/typo3/sysext/cms/tslib/class.tslib_fe.php on line 4408
On non Multidomain Installation we dont have this Problem.
Also it Ocures not if you are loggedin in Backend, or the first time after clearing cache.
The Securty-Fix has the folowing changes:
From:
$scriptPath = $GLOBALS['TSFE']->absRefPrefix . substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
To:
if (!$this->beUserLogin) { $scriptPath = $this->cObj->getUrlToCurrentLocation(); } else { // To break less existing sites, we allow the REQUEST_URI to be used for the prefix $scriptPath = t3lib_div::getIndpEnv('REQUEST_URI'); // Disable the cache so that these URI will not be the ones to be cached $this->disableCache(); }
Updated by Helmut Hummel almost 10 years ago
- Status changed from New to Needs Feedback
Please specify your prefixLocalAnchors configuration
Are there any non cacheable elements on the page (USER_INT, COA_INT)?
Updated by König David almost 10 years ago
Thanks for the fast answer,
My settings:
config.prefixLocalAnchors = output
I changed now to "all" and it works.
Updated by Helmut Hummel almost 10 years ago
Other than that, if it is possible for you by any means to switch from config.baseURL + config.prefixLocalAnchors to config.absRefPrefix only, it is highly recommended to do so (as mentioned in the advisory) http://typo3.org/teams/security/security-bulletins/typo3-core/typo3-core-sa-2014-003/
Updated by Helmut Hummel almost 10 years ago
- Status changed from Needs Feedback to Accepted
König David wrote:
Thanks for the fast answer,
My settings:
config.prefixLocalAnchors = output
I changed now to "all" and it works.
Thanks for the feedback. Obviously we need to instantiate a cObject if this is set to output.
Updated by Armin Vieweg almost 10 years ago
We've got the same error in TYPO3 6.2.9.
The reason is, if pages are cached, that the method TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->newCObj() is not triggered. Without $this->cObj the call of method getUrlToCurrentLocation() fails, of course.
A solution, which worked for us temporary, is to add the call to index_ts.php file (after line 238) manually:
if ($TSFE->isOutputting()) { $TT->push('Print Content', ''); // this is line 238 $TSFE->newCObj(); // this line fixes the issue $TSFE->processOutput(); $sendTSFEContent = TRUE; $TT->pull(); }
Updated by Thorsten Kahler almost 10 years ago
This regression was caused by https://review.typo3.org/#/c/35222/
Updated by Gerrit Code Review almost 10 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 http://review.typo3.org/35989
Updated by Helmut Hummel almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a919fd0361c38af97d9bd08b7a7f5198bae56bb5.
Updated by Gerrit Code Review almost 10 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36029
Updated by Gerrit Code Review almost 10 years ago
Patch set 1 for branch TYPO3_4-5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36030
Updated by Helmut Hummel almost 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 4ca17f67dbf2e3a9faecb396d63ebb2a1b1a7afc.