Bug #98372
closed
Redirect ”Defined by Domain entries“ does not work
Added by Bernhard Eckl about 2 years ago.
Updated 5 months ago.
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 to Bug #100215: Redirect by redirectMode "refererDomains" is broken added
- 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.
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
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.
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.
- Status changed from Resolved to Closed
Also available in: Atom
PDF