[Tramline-dev] Tramline and Plone login
Emyr Thomas
emyr.thomas at gmail.com
Fri Dec 2 18:07:28 CET 2005
Cracked it! The problem was that tramline was intercepting all POST
requests. It should in fact only intercept POST requests encoded as
multipart/form-data, since this is the encoding scheme that should be
used with input elements of type 'file'.
tramline should disregard application/x-www-form-urlencoded data.
Here's the patch (place after the POST check in inputfilter) for core.py:
# we only handle POST requests
if filter.req.method != 'POST':
filter.pass_on()
return
# we only handle multipart/form-data
enctype = filter.req.headers_in.get('Content-Type')
if enctype[:19] != 'multipart/form-data':
filter.pass_on()
return
I've also attached a diff file for your convenience.
Thanks for the help,
Emyr
On 02/12/05, Martijn Faassen <faassen at infrae.com> wrote:
> Emyr Thomas wrote:
> > Thanks Luis
> >
> > I commented out the return statement as you suggested and it worked.
> > That's an interesting lead, I'll try and look into it today if I have
> > some time. Maybe it's something to do with CookieCrumbler as Martijn
> > suggested.
>
> Thanks Luis and Emyr! Very useful to get some testing of tramline with a
> diversity of applications -- I think we can flush out the bugs quickly
> this way. Emyr, I'm taking you up on the offer to look into that newline
> issue with cookiecrumbler -- curious to see what's going on there. After
> a bit of analysis that indeed Luis' patch is safe we can hopefully close
> the issue.
>
> Regards,
>
> Martijn
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enctype.diff
Type: application/octet-stream
Size: 494 bytes
Desc: not available
Url : http://codespeak.net/pipermail/tramline-dev/attachments/20051202/b13847f7/enctype.obj
More information about the Tramline-dev
mailing list