commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23973] New: - the fileupload do not conform to the possible double quoting of the boundary
Date Tue, 21 Oct 2003 15:16:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23973>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23973

the fileupload do not conform to the possible double quoting of the boundary

           Summary: the fileupload do not conform to the possible double
                    quoting of the boundary
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: File Upload
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: rpieroni@dexem.com


the RFC 2046 in the 5.1.1 section
(http://www.pro-net.co.uk/site/mod_rfc/24/rfc/2046) say that the boundary
definition may be double quoted. 

the FileUploadBase class do not implement this. 

the code to change is at the 331/332 lines of that class.
before creating the boundary byte array, first check that double quotes are used
or not.

here is an exemple of patched code (as i posted to the commons-dev list) :
byte[] boundary = null;
if (contentType.charAt(boundaryIndex + 9) == '"' &&
    contentType.charAt(contentType.length() - 1) == '"') 
{
    boundary = contentType.substring(
        boundaryIndex + 10, contentType.length() - 2).getBytes();
} else {
    boundary = contentType.substring(boundaryIndex + 9).getBytes();
}

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message