You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "James Holmes (JIRA)" <ji...@apache.org> on 2008/12/05 18:22:37 UTC

[jira] Updated: (WW-2713) ParametersInterceptor: IndexOutOfBoundsException while logging parameters

     [ https://issues.apache.org/struts/browse/WW-2713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes updated WW-2713:
-----------------------------

    Fix Version/s: 2.1.3

> ParametersInterceptor: IndexOutOfBoundsException while logging parameters
> -------------------------------------------------------------------------
>
>                 Key: WW-2713
>                 URL: https://issues.apache.org/struts/browse/WW-2713
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.0.11.1
>         Environment: Struts 2.0.11.1, Eclipse, Unit Test
>            Reporter: Eduard Papa
>            Priority: Minor
>             Fix For: 2.1.3
>
>
> I had written a unit test which was running successfully until I turned on DEBUG level in log4j. This caused the unit test to fail and I tracked down the problem to the ParametersInterceptor, line 241 in xwork-2.0.4.jar: 
> logEntry.append(String.valueOf(valueArray[valueArray.length - 1]));
> The value array there can be empty (0-length) and that line will try to access valueArray[-1] which causes the exception. 
> I don't know if the user can submit input that would result in a request parameter with an empty array, so this might not be an issue in production applications, but I think it should be fixed for the sake of making the ParametersInterceptor more robust, in case anyone wants to test request parameters with empty arrays.  

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