In other words, the behavior you've demonstrated is intentional. If
you want to get wsgi.input as is, use req.body_file_raw. Or if you do
want the seekable body at pos 0, but want to make multiple small
reads, use f = req.body_file; f.read(1)... Things like
lxml.etree.parse(req.body_file) work as expected anyway -- no change
there.
> --
> You received this message because you are subscribed to the Google Groups "Paste Users" group.
> To post to this group, send email to paste...@googlegroups.com.
> To unsubscribe from this group, send email to paste-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/paste-users?hl=en.
>
>
--
Best Regards,
Sergey Schetinin
http://self.maluke.com/ -- My articles and open-source stuff
http://www.maluke.com/ -- My commercial software and custom development services
> For more options, visit this group at http://groups.google.com/group/paste-users?hl=en.
>
>
--
Best Regards,
Sergey Schetinin
http://self.maluke.com/ -- My articles and open-source stuff
http://www.maluke.com/ -- My commercial software and custom development services
The req.body_file_raw exposes environ['wsgi.input'] directly, so
reading from it will not add any additional processing, prereading
etc. The reason for making sure body_file is seekable by default is to
help the middleware play nice without additional work. Great to hear
that this change isn't too bad for the Swift.
Looking at this as a vector of attack, I imagine any app that uses cgi
module to parse the form data without first checking the body length
can be easily tricked into filling up the disk with tempfiles. And
given the use of readline, the memory as well. So I don't think this
makes the situation any worse.
> For more options, visit this group at http://groups.google.com/group/paste-users?hl=en.
>
>
--
Best Regards,
Sergey Schetinin
http://self.maluke.com/ -- My articles and open-source stuff
http://www.maluke.com/ -- My commercial software and custom development services
On 10 March 2011 18:19, tl...@kptpf.com <tl...@kptpf.com> wrote:
> There was no webob.Request.body_file_raw in 1.0.1. I guess we'll start
> using webob.Request.environ['wsgi.input']. :/
>
If there are no objections to this, I'll release this as 1.0.4 in a few days.