Project

General

Profile

Actions

Bug #63896

closed

class.tslib_fe: Call to a member function getUrlToCurrentLocation() after Update to TYPO3 4.5.39

Added by König David almost 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-12-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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();
}

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #62723: Cache poisoning with prefixLocalAchorsClosed2014-11-05

Actions
Has duplicate TYPO3 Core - Bug #64252: prefixLocalAnchors broken by call to member function on a non-objectClosed2015-01-12

Actions
Actions #1

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)?

Actions #2

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.

Actions #3

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/

Actions #4

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.

Actions #5

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();
}

Actions #6

Updated by Thorsten Kahler almost 10 years ago

This regression was caused by https://review.typo3.org/#/c/35222/

Actions #7

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

Actions #8

Updated by Helmut Hummel almost 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

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

Actions #10

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

Actions #11

Updated by Helmut Hummel almost 10 years ago

  • Status changed from Under Review to Resolved
Actions #12

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF