Project

General

Profile

Actions

Bug #49104

closed

Felogin: Redirection problem with the 'redirect_url' parameter

Added by Cédric Delécluse almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
felogin
Target version:
-
Start date:
2013-06-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

FrontendLoginController.diff (862 Bytes) FrontendLoginController.diff Cédric Delécluse, 2013-06-13 16:34
Actions #1

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">

Actions #2

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.

Actions #3

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.

Actions #4

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Closed
Actions #5

Updated by Alexander Opitz almost 11 years ago

  • Target version deleted (next-patchlevel)
Actions

Also available in: Atom PDF