struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <>
Subject [jira] [Commented] (WW-4083) ParametersInterceptor acceptParamNames and ParameterNameAware's acceptableParameterName conflicts
Date Wed, 29 May 2013 00:10:20 GMT


Hudson commented on WW-4083:

Integrated in Struts2-JDK6 #717 (See [])
    WW-4083 Extends support of ParametersNameAware to pass the same behaviour to OgnlValueStack
(Revision 1487092)

     Result = SUCCESS
lukaszlenart : 
Files : 
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/

> ParametersInterceptor acceptParamNames and ParameterNameAware's acceptableParameterName
> -------------------------------------------------------------------------------------------------
>                 Key: WW-4083
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions:
>            Reporter: Johan Ström
>             Fix For: 2.3.15
> If the ParameterInterceptor config element 'acceptParamNames' does not match a name,
but the ParameterNameAware accepts it, the interceptor will fail to set it on the valuestack.
> In ParametersInterceptor, the acceptParamNames config element is used in two places on
each interception:
> * to fill up acceptableParameters. This is based on both acceptParamNames config, AND
any ParameterNameAware's acceptableParameterName(Strings) method.
> * to setAcceptProperties on the MemberAccessValueStack. This ONLY uses the acceptParamNames
> The problem occurs if acceptParamNames config rejects a param, but acceptableParameterName(String)
accepts it. The ParameterInterceptor will go try to set the value on the stack (since it was
accepted by the ParameterNameAware), but the stack will reject it since setAcceptProperites
is based on acceptParamNames only.
> Not sure what the proper fix here is, but at least it explains the problem I'm having
and what other people might have.
> The reason it was not accepted by the config was that after the WW-3973 change, any parameter
accepted by EITHER the config or the ParameterNameAware is passed on. I tried to guard against
this by setting a very restrictive config for acceptableParameters (i.e. a dummy value which
did not let ANY parameter througH), with the idea that the ParameterNameAware would allow
> The quick fix for me would be to just accept the parameter name explicitly in the config,
and skip the ParameterNameAware part, but I still want to report it as it is probably not
what is expected.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message