Incze,

The fix for this - unwrapping the request - has been made on the main trunk
(Struts 1.1) in CVS, but has not been applied to the Struts 1.0 branch. If
you can, you might want to try using the latest nightly build until the
change gets into 1.0. There is a bug in Bugzilla (#2039) for this, so
hopefully it will be fixed before 1.0 ships.

--
Martin Cooper


----- Original Message -----
From: "Incze Lajos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 10, 2001 4:33 PM
Subject: Multipart request handling


> I've just verified that the detected behaviour (upload bombs when
> form validation fails) has reason. When a validation error occurs
> the following code gets executed:
>
>         //does our form have a multipart request?
>         if (formInstance.getMultipartRequestHandler() != null) {
>             //rollback the request
>             if (debug > 1) {
>                 log("  Rolling back the multipart request");
>             }
>
>             formInstance.getMultipartRequestHandler().rollback();
>         }
>         ...
>         rd.forward(request, response);
>         return (false);
>
> What is missing here is the code snippet from the normal executionpath:
>
>         //set the request back to it's normal state if it's currently
wrapped,
>         //to avoid ClassCastExceptions from ServletContainers if
forwarding
>         if (request instanceof MultipartRequestWrapper) {
>             request = ((MultipartRequestWrapper) request).getRequest();
>         }
>
> That's only one point, but the whole ActionServlet code should be scanned
> through as there are places (e.g. the forward and include mapping type for
> the first sight) where the same problem seems to occur.
>
> incze


Reply via email to