You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by "Graham Dumpleton (JIRA)" <ji...@apache.org> on 2006/04/11 12:45:20 UTC

[jira] Created: (MODPYTHON-159) multiline headers in multipart/form not handled

multiline headers in multipart/form not handled
-----------------------------------------------

         Key: MODPYTHON-159
         URL: http://issues.apache.org/jira/browse/MODPYTHON-159
     Project: mod_python
        Type: Bug

  Components: core  
    Versions: 3.1.4, 3.2.8    
    Reporter: Graham Dumpleton


Reported a long time back on mailing list that multiline headers in a multipart/form post are not handled properly by util.FieldStorage class.

  http://www.modpython.org/pipermail/mod_python/2001-November/012256.html

This seems to never have been addressed. Further comments confirming this posted in:

  http://www.mail-archive.com/python-dev@httpd.apache.org/msg01805.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Work started: (MODPYTHON-159) multiline headers in multipart/form not handled

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-159?page=all ]

Work on MODPYTHON-159 started by Graham Dumpleton.

> multiline headers in multipart/form not handled
> -----------------------------------------------
>
>                 Key: MODPYTHON-159
>                 URL: http://issues.apache.org/jira/browse/MODPYTHON-159
>             Project: mod_python
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.8, 3.1.4
>            Reporter: Graham Dumpleton
>         Assigned To: Graham Dumpleton
>             Fix For: 3.3
>
>         Attachments: MP159-20060911-grahamd-1.diff
>
>
> Reported a long time back on mailing list that multiline headers in a multipart/form post are not handled properly by util.FieldStorage class.
>   http://www.modpython.org/pipermail/mod_python/2001-November/012256.html
> This seems to never have been addressed. Further comments confirming this posted in:
>   http://www.mail-archive.com/python-dev@httpd.apache.org/msg01805.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MODPYTHON-159) multiline headers in multipart/form not handled

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MODPYTHON-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Graham Dumpleton closed MODPYTHON-159.
--------------------------------------


> multiline headers in multipart/form not handled
> -----------------------------------------------
>
>                 Key: MODPYTHON-159
>                 URL: https://issues.apache.org/jira/browse/MODPYTHON-159
>             Project: mod_python
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1.4, 3.2.8
>            Reporter: Graham Dumpleton
>         Assigned To: Graham Dumpleton
>             Fix For: 3.3
>
>         Attachments: MP159-20060911-grahamd-1.diff
>
>
> Reported a long time back on mailing list that multiline headers in a multipart/form post are not handled properly by util.FieldStorage class.
>   http://www.modpython.org/pipermail/mod_python/2001-November/012256.html
> This seems to never have been addressed. Further comments confirming this posted in:
>   http://www.mail-archive.com/python-dev@httpd.apache.org/msg01805.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MODPYTHON-159) multiline headers in multipart/form not handled

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-159?page=all ]

Graham Dumpleton updated MODPYTHON-159:
---------------------------------------

    Fix Version/s: 3.3

Another candidate for 3.3. Fix should be pretty simple, just need to adapt the original proposed change as posted on mailing list back in 2001.

> multiline headers in multipart/form not handled
> -----------------------------------------------
>
>                 Key: MODPYTHON-159
>                 URL: http://issues.apache.org/jira/browse/MODPYTHON-159
>             Project: mod_python
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1.4, 3.2.8
>            Reporter: Graham Dumpleton
>             Fix For: 3.3
>
>
> Reported a long time back on mailing list that multiline headers in a multipart/form post are not handled properly by util.FieldStorage class.
>   http://www.modpython.org/pipermail/mod_python/2001-November/012256.html
> This seems to never have been addressed. Further comments confirming this posted in:
>   http://www.mail-archive.com/python-dev@httpd.apache.org/msg01805.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (MODPYTHON-159) multiline headers in multipart/form not handled

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-159?page=all ]

Graham Dumpleton resolved MODPYTHON-159.
----------------------------------------

    Resolution: Fixed

> multiline headers in multipart/form not handled
> -----------------------------------------------
>
>                 Key: MODPYTHON-159
>                 URL: http://issues.apache.org/jira/browse/MODPYTHON-159
>             Project: mod_python
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.8, 3.1.4
>            Reporter: Graham Dumpleton
>         Assigned To: Graham Dumpleton
>             Fix For: 3.3
>
>         Attachments: MP159-20060911-grahamd-1.diff
>
>
> Reported a long time back on mailing list that multiline headers in a multipart/form post are not handled properly by util.FieldStorage class.
>   http://www.modpython.org/pipermail/mod_python/2001-November/012256.html
> This seems to never have been addressed. Further comments confirming this posted in:
>   http://www.mail-archive.com/python-dev@httpd.apache.org/msg01805.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MODPYTHON-159) multiline headers in multipart/form not handled

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-159?page=all ]

Graham Dumpleton updated MODPYTHON-159:
---------------------------------------

    Attachment: MP159-20060911-grahamd-1.diff

Indenting got stuffed up when pasted in for some reason. Have attached possible patch instead.

> multiline headers in multipart/form not handled
> -----------------------------------------------
>
>                 Key: MODPYTHON-159
>                 URL: http://issues.apache.org/jira/browse/MODPYTHON-159
>             Project: mod_python
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.8, 3.1.4
>            Reporter: Graham Dumpleton
>             Fix For: 3.3
>
>         Attachments: MP159-20060911-grahamd-1.diff
>
>
> Reported a long time back on mailing list that multiline headers in a multipart/form post are not handled properly by util.FieldStorage class.
>   http://www.modpython.org/pipermail/mod_python/2001-November/012256.html
> This seems to never have been addressed. Further comments confirming this posted in:
>   http://www.mail-archive.com/python-dev@httpd.apache.org/msg01805.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MODPYTHON-159) multiline headers in multipart/form not handled

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/MODPYTHON-159?page=comments#action_12433832 ] 
            
Graham Dumpleton commented on MODPYTHON-159:
--------------------------------------------

Does this patch seem correct for current implementation of util.FieldStorage?

Index: lib/python/mod_python/util.py
===================================================================
--- lib/python/mod_python/util.py       (revision 442143)
+++ lib/python/mod_python/util.py       (working copy)
@@ -174,6 +174,10 @@
   
             skip_this_part = False
             while line not in ('\r','\r\n'):
+                nextline = req.readline(readBlockSize)
+                while nextline and nextline[0] in [ ' ', '\t']:
+                    line = line + nextline
+                    nextline = req.readline(readBlockSize)
                 # we read the headers until we reach an empty line
                 # NOTE : a single \n would mean the entity is malformed, but
                 # we're tolerating it anyway
@@ -192,7 +196,7 @@
                     if ctype.find('/') == -1:
                         ctype = 'application/octet-stream'
             
-                line = req.readline(readBlockSize)
+                line = nextline
                 match = boundary.match(line)
                 if (not line) or match:
                     # we stop if we reached the end of the stream or a stop boundary


> multiline headers in multipart/form not handled
> -----------------------------------------------
>
>                 Key: MODPYTHON-159
>                 URL: http://issues.apache.org/jira/browse/MODPYTHON-159
>             Project: mod_python
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.8, 3.1.4
>            Reporter: Graham Dumpleton
>             Fix For: 3.3
>
>
> Reported a long time back on mailing list that multiline headers in a multipart/form post are not handled properly by util.FieldStorage class.
>   http://www.modpython.org/pipermail/mod_python/2001-November/012256.html
> This seems to never have been addressed. Further comments confirming this posted in:
>   http://www.mail-archive.com/python-dev@httpd.apache.org/msg01805.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (MODPYTHON-159) multiline headers in multipart/form not handled

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-159?page=all ]

Graham Dumpleton reassigned MODPYTHON-159:
------------------------------------------

    Assignee: Graham Dumpleton

> multiline headers in multipart/form not handled
> -----------------------------------------------
>
>                 Key: MODPYTHON-159
>                 URL: http://issues.apache.org/jira/browse/MODPYTHON-159
>             Project: mod_python
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.8, 3.1.4
>            Reporter: Graham Dumpleton
>         Assigned To: Graham Dumpleton
>             Fix For: 3.3
>
>         Attachments: MP159-20060911-grahamd-1.diff
>
>
> Reported a long time back on mailing list that multiline headers in a multipart/form post are not handled properly by util.FieldStorage class.
>   http://www.modpython.org/pipermail/mod_python/2001-November/012256.html
> This seems to never have been addressed. Further comments confirming this posted in:
>   http://www.mail-archive.com/python-dev@httpd.apache.org/msg01805.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira