Re: Re: CookieCrumbler, redirect and query_string gets lost

Peter Zechmeister <[email protected]>
Newsgroups gmane.comp.cms.zms.devel
Message-ID <1194511293.7171.12.camel@peterz-desktop>
There is a further proposal to our last JKU-WebOffice proposal in this
topic.
With the currently implemented patch there is a problem in some cases
where "lang=xxx" is given already in the url-query. Through the patch
"lang" gets appended a second time to the query with the effect that the
REQUEST lang variable gets represented as a list instead of a string and
this causes zms to crash.

So here is the code wich should fix this bug:
Products/zms/dtml/zms/index.dtml:


><dtml-comment><!------- RESTRICT ACCESS
-------------------------------></dtml-comment
><dtml-unless "hasAccess(REQUEST)"
><dtml-comment><!-- CookieCrumbler Login Form --></dtml-comment
><dtml-if "_.hasattr(oRoot,'login_form')"
><dtml-comment>###### WebOffice pze 071106 ######</dtml-comment
  ><dtml-if "REQUEST.get('QUERY_STRING', '')"
    ><dtml-if "'lang=' in REQUEST.get('QUERY_STRING')"
      ><dtml-return "RESPONSE.redirect('login_form?%
s'%(REQUEST.get('QUERY_STRING', '')))"
    ><dtml-else
      ><dtml-return "RESPONSE.redirect('login_form?lang=%s%s'%(lang,
'&'+REQUEST.get('QUERY_STRING','')))"
    ></dtml-if>
  ><dtml-else
    ><dtml-return "RESPONSE.redirect('login_form?lang=%s'%(lang))"
  ></dtml-if
><dtml-comment>###### /WebOffice pze 071106 ######</dtml-comment
><dtml-comment><!-- Redirect to parent --></dtml-comment
><dtml-elif "URL.find('/index_')>URL.find('.html')"
><dtml-return "RESPONSE.redirect('%s/index_%s.html'%(URL1,lang))"
><dtml-else
><dtml-call "viewPermission()"
></dtml-if
></dtml-unless


Regards
Peter Zechmeister, WebOffice-JKU



Am Donnerstag, den 11.10.2007, 19:12 +0000 schrieb Dr. Frank Hoffmann:
> Hi,
> Your proposal is implemented in the latest build here:
> http://bscw.hoffmannliebenberg.de/pub/bscw.cgi/d296324/zms-2.10.4-
> 19.tar.gz
> 
> Latest Changes:
> ....
> --------------------------------------------------
> 2007-10-08::zms-2.10.4-18
> -- MINOR CHANGES
> [00508] Applied fix for 00467 (revised support for CSS-stylesheets): 
> move css to common/styles.
> [00509] Applied fix for DC.accessRights.restrictedEditors: use 
> getRolesInContext (requested by xm).
> [00510] Added support for XHTML complient use of ampersands in URIes 
> (refer to http://www.w3.org/TR/xhtml1/#C_12).
> --------------------------------------------------
> 2007-10-11::zms-2.10.4-19
> -- MINOR CHANGES
> [00511] Revised template-set myZMStheme32: added support for 
> headScript in standard_html_header (by un-commenting).
> [00512] Added fixes for problems of xstandard wysiwyg-editor in 
> Mozilla Firefox.
> [00513] Added support for committing objects without creating new 
> versions (onChangeObj(..do_history=False..)) (requested by desy).
> [00514] Added support for QUERY_STRING to CookieCrumbler-redirect in 
> index.dtml (contributed by N. Drosson).
> --------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.