Project

General

Profile

Actions

Bug #98372

closed

Redirect ”Defined by Domain entries“ does not work

Added by Bernhard Eckl about 2 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
felogin
Target version:
-
Start date:
2022-09-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

According to the docs I added typoscript plugin.tx_felogin_login.domains = sub.domain.xyz and set that redirect mode (I also added get parameter ?referer=https://sub.domain.xyz/path/ to the url). Did not work.

The only way I could get it working was:
- Create a page and set is site root
- Create a site configuration and insert the domain under which the redirect should work
- Use referer as redirect mode


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #100215: Redirect by redirectMode "refererDomains" is brokenClosed2023-03-18

Actions
Actions #1

Updated by Torben Hansen over 1 year ago

  • Related to Bug #100215: Redirect by redirectMode "refererDomains" is broken added
Actions #2

Updated by Torben Hansen 11 months ago

  • Assignee set to Torben Hansen

This is actually expected behavior, since the redirect URL for the "Defined by Domain" setting must be known to TYPO3 (either the current domain or a domain which in configured as site). I will update the docs accordingly.

Actions #3

Updated by Gerrit Code Review 11 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82533

Actions #4

Updated by Gerrit Code Review 11 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82572

Actions #5

Updated by Torben Hansen 11 months ago

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

Updated by Bernhard Eckl 10 months ago

Okay, but why is that expected?

In my case I have an external intranet application on a subdomain, the intranet application checks the TYPO3 login and if I am not logged in I get redirected to the login page with ?redirect_url=https://intranet.domain.tld parameter. This worked without extra site configuration before. Now it is needed.

Actions #7

Updated by Torben Hansen 10 months ago

As fas as I can see, it should always have worked that way (see old legacy plugin https://github.com/TYPO3/typo3/blob/9.5/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php#L1040). There it is checked, if the given redirect URL either is:

- is a relative path (e.g. /foo/bar/)
- is the same as the current hostname
- is known to TYPO3 (either entry in sites or a sys_domain record exist)

So if this has somehow worked before, I think you maybe had a sys_domain for that domain?

However, I have plans to add a PSR-14 event for TYPO3 v13 for the redirectUrl validation, so the described scenario is possible. This may be helpful, when TYPO3 is the SSO system for external applications. Current workaround is to create a plugin, which handles the redirect. You can then add a redirectUrl to ext:felogin, which redirects to the page with your redirect plugin, which then finally handles the redirect to an external page.

Actions #8

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF