Re: CookieCrumbler, redirect and query_string gets lost
"Mag. Nicolas Drosson" <[email protected]>
| Newsgroups | gmane.comp.cms.zms.devel |
|---|---|
| Message-ID | <1191916348.25132.2.camel@goseigen-buero> |
To write it well, it should read:
><dtml-return "RESPONSE.redirect('login_form?lang=%s%s'%(lang,
REQUEST.get('QUERY_STRING', '') and '&' + REQUEST.get('QUERY_STRING',
'')))"
or
><dtml-return "RESPONSE.redirect('login_form?lang=%s%s'%! (lang,
getattr(REQUEST,'QUERY_STRING','') and
('&'+getattr(REQUEST,'QUERY_STRING'))))"
regards, Nico
Am Dienstag, den 09.10.2007, 07:40 +0000 schrieb Nicolas Drosson:
> Hi,
>
> we are experiencing some difficulties with a redirect during login:
> the user tries to go to a url with query but has to log in. So he/she
> gets redirected to the login form of CookieCrumbler. Unfortunately the
> query gets lost during redirect. I looked at source code and found
> in /Products/zms/dtml/zms/index.dtml at line 20 and further:
>
>
>
> ><dtml-unless "hasAccess(REQUEST)"
> ><dtml-comment><!-- CookieCrumbler Login Form
> --></dtml-comment
> ><dtml-if "_.hasattr(oRoot,'login_form')"
> ><dtml-return "RESPONSE.redirect('login_form?lang=%s'%lang)"
>
> I think the last line should read:
>
> ><dtml-return "RESPONSE.redirect('login_form?lang=%s&%
> s'%(lang, REQUEST.get('QUERY_STRING', '')))"
>
> or
>
> ><dtml-return "RESPONSE.redirect('login_form?lang=%s%s'
> %! (lang, getattr(REQUEST,'QUERY_STRING','')
> and ('&'+getattr(REQUEST,'QUERY_STRING'))))"
>
> Could someone please check this and if necessary fix the bug or is
> there any reason why the QUERY_STRING gets cut?
>
> Thx in advance. Nico
>
>
>