[TYPO3-core] RFC: #10327: [felogin] redirecting to referer does not work
Steffen Gebert
steffen at steffen-gebert.de
Tue Feb 17 11:19:30 CET 2009
Steffen Kamper wrote:
> BT reference: http://bugs.typo3.org/view.php?id=10327
>
> 1) when setting referer, you come to login page. Now you enter your data
> and press submit button - referer will be overwritten with actual page
>
> Solution: save referer in hidden form field if needed.
>
> 2) the redirect process overwrites the redirect_url. If the last option
> has empty url, other urls are lost
>
> Solution: use array in redirect options, remove empty values and use
> last found url.
Hi Steffen,
thanks for your patch. Did you have my problem report [1] in mind while
writing this patch?
I think/hope so - at least it fixes this issue:
>redirectMode = login,getpost
> redirectFirstMethod = 0
Uses empty redirect_url so login mode would never be used.
This works now, thanks.
Unfortunately my workaround (which is a totally legal config..)
> redirectMode = getpost,login
> redirectFirstMethod = 1
doesn't work now, as this now uses empty redirectUrl :(
Line 368f
> case 'getpost':
> $redirect_url[] = $this->redirectUrl;
So line 468:
>if (count($redirect_url) > 0 && $this->conf['redirectFirstMethod']) {
matches and we finish getting $redirect_url.
But as $redirect_url[0] = '' we later don't know, where to redirect to.
I don't really see the sense behind using an array for $redirect_url (at
least with redirectFirstMethod).
Instead we should check instead of count, if there's really a non-empty
array entry in $redirect_url, or (IMHO better) not use empty $this-
>redirectUrl in
> case 'getpost':
> $redirect_url[] = $this->redirectUrl;
I hope my explanations are clear enough. Thanks for your efforts!
Regards
Steffen
[1] http://lists.netfielders.de/pipermail/typo3-dev/2008-December/032718.html
More information about the TYPO3-team-core
mailing list