Uploaded image for project: 'mod_python'
  1. mod_python
  2. MODPYTHON-40

FieldStorage : don't stream file uploads to memory

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.4
    • Fix Version/s: 3.2.7
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nlehuen Nicolas Lehuen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: