Zope 2.13 and zope.publisher >= 3.9
Hello, In zope.publisher 3.9.0, the signature of the redirect method of a response changed to include a new trusted option that you *need* to set to True in order to get redirect working in most cases (otherwise it denies the redirect that are not in the domain than your application). That new option annoy me in Zope 2.13, as there is no such option to the redirect method on the Zope 2 response. Now I am working in five.grok which uses grokcore.view. Grokcore.view provides some redirect utilities, and they have to use that trusted option in order to get things working. And they doesn't work in Zope 2 anymore. So I would like a bit of help to fix that problem. I see two possible solutions: - changing the default value of the trusted option in zope.publisher, to be a bit more backward compatible (and call that redirect with trusted=False in zope.[app].authentication where it motivated that change), - add a trusted option to redirect in Zope 2. What do you thing what should be done ? (Yes, I will create a launchpad issue, but I would like to see that issue fixed more or less quickly). Regards, Sylvain, -- Sylvain Viollon -- Infrae t +31 10 243 7051 -- http://infrae.com Hoevestraat 10 3033GC Rotterdam -- The Netherlands
On Tue, Dec 7, 2010 at 7:13 PM, Sylvain Viollon <sylvain@infrae.com> wrote:
That new option annoy me in Zope 2.13, as there is no such option to the redirect method on the Zope 2 response.
- changing the default value of the trusted option in zope.publisher, to be a bit more backward compatible (and call that redirect with trusted=False in zope.[app].authentication where it motivated that change),
We already adjusted all the ZTK code to work with this new default and released this over 18 months ago. I think it's too late to change the behavior again.
- add a trusted option to redirect in Zope 2.
If adding a simple "trusted=None" no-op to the redirect method helps you, I wouldn't be opposed to it. I wouldn't even port the actual feature as it's not all too useful and the ZPublisher implements a lot of things differently compared to zope.publisher anyways. If you really want to port the feature, we need to make it backwards compatible in Zope 2, so by default all redirects should be allowed (default of trusted=True). Hanno
participants (2)
-
Hanno Schlichting -
Sylvain Viollon