struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4667) ParametersInterceptor excludeParams only applies to first instance of params interceptor in paramsPrepareParamsStack
Date Tue, 06 Sep 2016 07:17:21 GMT

    [ https://issues.apache.org/jira/browse/WW-4667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15466679#comment-15466679
] 

ASF subversion and git services commented on WW-4667:
-----------------------------------------------------

Commit ab0cb82d31cbad47664dee423ddbf0894b004d27 in struts's branch refs/heads/master from
[~lukaszlenart]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=ab0cb82 ]

WW-4667 Applies params to all instances of interceptor defined in stack

# Conflicts:
#	xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java


> ParametersInterceptor excludeParams only applies to first instance of params interceptor
in paramsPrepareParamsStack
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-4667
>                 URL: https://issues.apache.org/jira/browse/WW-4667
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.5.1
>            Reporter: Chris Cranford
>             Fix For: 2.3.31, 2.5.3
>
>
> I typically extend the existing stacks with my own interceptor references on an as needed
basis, as shown below.  
> The problem I face is that when I use the {{paramsPrepareParamsStack}}, I am noticing
that the ParametersInterceptor excludes the custom defined entries on the first instance of
the named {{params}} interceptor; however the second instance in the stack ignores these settings.
> {code}
> <interceptor-stack name="customStack">
>   <interceptor-ref name="myCustomInterceptor" />
>   <interceptor-ref name="paramsPrepareParamsStack">
>     <param name="fileUpload.maximumSize">20480000</param>
>     <param name="params.excludeParams">
>       dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...*,submit,myObject\..*
>     </param>
>   </interceptor-ref>
> </interceptor-stack>
> {code}
> I suspect the code is likely just applying the parameters to the first named instance
and breaking the loop rather than making sure _all_ instances of the named interceptor have
the parameters applied correctly during Struts2 bootstrapping.
> The only workaround I've found is to avoid using the provided interceptor stack directly
and copy it into my custom stack and explicitly set the excludeParams explicitly on both _params_
interceptor instances.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message