Apache Mod-Python - Reopened: (MODPYTHON-40) FieldStorage : don't stream file uploads to memory

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > November 2005 > Reopened: (MODPYTHON-40) FieldStorage : don't stream file uploads to memory





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Reopened: (MODPYTHON-40) FieldStorage : don't stream file uploads to memory
Nicolas Lehuen (JIRA)

2005-11-08, 5: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/...ber/019468.html and the python-dev mailing list (GMane archive are not up to date, sorry).

Alexis Marrero <amarrero@mitre.org> has proposed a fix, inspired from what CherryPy does. I've added a few unit tests to the mix, with the help of Jim Gallacher who found a small file that could always break the file upload system.


> 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 if its Content-Disposition header features a filename attribute. Otherwise, the file is streamed to memory, thus opening a potential DoS attack by uploading 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, with a default to a temporary directory / file.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com