History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-693
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Mathias Bogaert
Reporter: agile.wang
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
WebWork

FileUploadInterceptor don't check the allowed files's Enumeration whitch is null.

Created: 07/Dec/04 08:54 PM   Updated: 08/Dec/04 07:15 PM
Component/s: Interceptors
Affects Version/s: 2.1.6
Fix Version/s: 2.1.7

Environment: OS:WINDOWS 2000 JDK:JDK1.5 WEB SERVER:TOMCAT 5.5.4


 Description  « Hide
I use FileUploadInterceptor to upload files,and I set the webwork.multipart.maxSize=12345.When I upload a file whose size is lager than 12345,it will throw NPE.I view the exception stack trace,and found it was thrown at
 // Bind allowed Files
while (e.hasMoreElements())

When I change it as
 // Bind allowed Files
 while (e!= null && e.hasMoreElements()) {

.....

// cleanup
e = multiWrapper.getFileParameterNames();

while (e!= null && e.hasMoreElements()) {

everything is oK.

Is this a bug?

Thanks.



 All   Comments   Change History      Sort Order:
Mathias Bogaert - [08/Dec/04 05:42 AM ]
Was indeed a problem. Fixed it!

agile.wang - [08/Dec/04 07:15 PM ]
I used cos and pell to upload file yesterday,and throwing NPE in CosMultiPartRequest.java and PellMultiPartRequest.java,but everything is ok in JakartaMultiPartRequest.java.
I suggest that you should make a code review with CosMultiPartRequest.java and PellMultiPartRequest.java,because they are too weak to use in program.