Issue Bug Closed

#82297Redirect loop with workspace and realurl

Christoph Lehmann 09/05/17, 12:23 updated 10/02/18, 10:57

Description

We have a multidomain environment:

www.domain.com (main domain and login domain for backend)
www1.domain.com (another site tree with another live domain)

www1.domain is another site tree with its own domain, but we use a subdomain for it to improve cookie handling of backend sessions and backend previews. We also use TCEMAIN.previewdomain extensivly, but that’s irreleveant). We also use realurl 2.X.

The current problem is:

An editor works in workspace only in tree of www1.domain.com and does not see the pagetree of www.domain.com. When he opens another tab (FE) with www.domain.com he gets an infinite redirect, which is done in https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php#L2887

        // Prevent redirection loop
        if (!empty($redirectUrl)) {
            // redirect and exit
            HttpUtility::redirect($redirectUrl, HttpUtility::HTTP_STATUS_307);
        }

The block should prevent redirect loops, but does not check if the actual $_SERVER[‘REQUEST_URI’] is the same as redirectUrl. When i extend the condition to

!empty($redirectUrl) && $redirectUrl !== $_SERVER['REQUEST_URI']

the redirect is not done and the page is shown as expected.

Another ticket, same place in code: https://forge.typo3.org/issues/65447

Reviews 2