11-08-05 10:56 PM
[ http://issues.apache.org/jira/brows...HON-40?page=all ]
Nicolas Lehuen reopened MODPYTHON-40:
-------------------------------------
The fix has a bug - see http://www.modpython.org/pipermail/...
r/019468.html and the python-dev mailing list (GMane archive are not up to d
ate, sorry).
Alexis Marrero <amarrero@mitre.org> has proposed a fix, inspired from what C
herryPy does. I've added a few unit tests to the mix, with the help of Jim G
allacher who found a small file that could always break the file upload syst
em.
> FieldStorage : don't stream file uploads to memory
> --------------------------------------------------
>
> Key: MODPYTHON-40
> URL: http://issues.apache.org/jira/browse/MODPYTHON-40
> Project: mod_python
> Type: Bug
> Versions: 3.1.4
> Reporter: Nicolas Lehuen
> Fix For: 3.2
>
> In mod_python.py/util.py, line 169, we stream a file upload to disk only i
f its Content-Disposition header features a filename attribute. Otherwise, t
he file is streamed to memory, thus opening a potential DoS attack by upload
ing very large files.
> We should :
> 1) Always stream file upload to disk
> 2) Define a default maximum file size which could be overridable.
> 3) Allow for the user to specify in which directory file uploads should be made, w
ith a default to a temporary directory / file.
[ Post a follow-up to this message ]
|