struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Racon (JIRA)" <j...@apache.org>
Subject [jira] Commented: (WW-1976) FileUpload does not ignore 0 byte files when using Jakarta FileUpload impl
Date Fri, 08 Jun 2007 15:13:26 GMT

    [ https://issues.apache.org/struts/browse/WW-1976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41199
] 

Lukasz Racon commented on WW-1976:
----------------------------------

Same problem, slightly different solution:
https://issues.apache.org/struts/browse/WW-1911

IMHO, we should check the file name not the size. 
I can envision people uploading empty files and expecting that it will appear in the action
as empty file.

> FileUpload does not ignore 0 byte files when using Jakarta FileUpload impl
> --------------------------------------------------------------------------
>
>                 Key: WW-1976
>                 URL: https://issues.apache.org/struts/browse/WW-1976
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.0.8
>            Reporter: Aymeric Levaux
>         Attachments: JakartaMultiPartRequest.java.patch
>
>
> When not selecting any file to upload in a file input, Struts does not ignore the 0 byte
file returned by jakarta FileUpload.
> This means that a file is injected in the action even if nothing was uploaded. 
> In webwork the check was done in the constructor of  com.opensymphony.webwork.dispatcher.multipart.JakartaMultiPartRequest:
> else if (item.getSize() == 0) {
>   log.warn("Item is a file upload of 0 size, ignoring");
> }
> In struts the parsing of the request moved from the constructor to a parse method but
the above check disappeared.
> Additionally this behaviour is inconsistant with the "pell" implementation that ignores
0 byte files.

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


Mime
View raw message