Bug #49104
closedFelogin: Redirection problem with the 'redirect_url' parameter
0%
Description
Hello,
There is a problem with the parameter redirect_url.
I have create a page with a login form inside.
In the felogin plugin I have defined this redirection modes :
- GET/POST
- login
- error
- logout
I have too defined in TypoScript :
config {
typolinkLinkAccessRestrictedPages = UID_PAGE_LOGIN
typolinkLinkAccessRestrictedPages_addParams = &redirect_url=###RETURN_URL###
}
In my page login I have the HTML code :
<input type="hidden" value="fr/connexion/?redirect_url=fr%accueil%2F" name="redirect_url">
'accueil' is defined in the plugin Flexform (field redirectPageLogin) => It's OK
'fr/connexion/?...' because I have defined config.typolinkLinkAccessRestrictedPages => It's OK
When I valid my login form, in FrontendLoginController.php the parameter GET (or POST) has the value :
fr/connexion/?redirect_url=fr/connexion/?redirect_url=fr%accueil%2F
And this url is used for the redirection while the good URL must be fr/connexion/?redirect_url=fr%accueil%2F
I have writing a fix. What do you think ?
Files
Updated by Markus Klein almost 11 years ago
<input type="hidden" value="fr/connexion/?redirect_url=fr%accueil%2F" name="redirect_url">
Will always lead to a GET/POST var of "redirect_url=fr/connexion/?redirect_url=fr%accueil%2F"
Your HTML should be:
<input type="hidden" value="fr%accueil%2F" name="redirect_url">
Updated by Cédric Delécluse almost 11 years ago
If a user attempts to access a secure page I want to display the login page and then redirect. If I remove
config.typolinkLinkAccessRestrictedPages
then indeed I have
<input type="hidden" value="fr%accueil%2F" name="redirect_url">
How to have only (with config.typolinkLinkAccessRestrictedPages) ?
<input type="hidden" value="fr%accueil%2F" name="redirect_url">
I use Typo3 6.0.2.
Thanks you for your help.
Updated by Cédric Delécluse almost 11 years ago
Hello,
I have added a condition on my Typoscript for desactivate the typolinkLinkAccessRestrictedPages :
[globalVar = TSFE:id != {$contentpage.loginPageID}] typolinkLinkAccessRestrictedPages = {$contentpage.loginPageID} typolinkLinkAccessRestrictedPages_addParams = &redirect_url=###RETURN_URL### [global]
And now it's ok.
The ticket could be closed.
Updated by Alexander Opitz almost 11 years ago
- Status changed from New to Closed
Updated by Alexander Opitz almost 11 years ago
- Target version deleted (
next-patchlevel)