You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2012/12/09 13:51:21 UTC
[jira] [Comment Edited] (WW-3927)
com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message
in log
[ https://issues.apache.org/jira/browse/WW-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13527432#comment-13527432 ]
Lukasz Lenart edited comment on WW-3927 at 12/9/12 12:49 PM:
-------------------------------------------------------------
I'm not sure if I understand you. Just check the defaultStack in struts-default.xml, as you can notice, multiselect and checkbox interceptors are set before params interceptor. So, if params matches _multiselect_ prefixes, the name is extracted from it and set as a parameter instead of it - the new parameter somehow replaces incoming _multiselect_ param - thus should explain why you don't see developer notification.
Eg.
{noformat}
request(_muliselect_name[0]=Foo, _multiselect_name[1]=Foo)
multiselect
-> _multiselect_name[0] => name[0]
-> _multiselect_name[1] => name[1]
params
-> name[0] -> add value to name list
-> name[1] -> add value to name list
{noformat}
was (Author: lukaszlenart):
I'm not sure if I understand you. Just check the defaultStack in struts-default.xml, as you can notice, multiselect and checkbox interceptors are set before params interceptor. So, if params matches _multiselect_ prefixes, the name is extracted from it and set as a parameter instead of it - the new parameter somehow replaces incoming _multiselect_ param - thus should explain why you don't see developer notification.
Eg.
request(_muliselect_name[0]=Foo, _multiselect_name[1]=Foo)
multiselect
-> _multiselect_name[0] => name[0]
-> _multiselect_name[1] => name[1]
params
-> name[0] -> add value to name list
-> name[1] -> add value to name list
> com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log
> ----------------------------------------------------------------------------------
>
> Key: WW-3927
> URL: https://issues.apache.org/jira/browse/WW-3927
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.3.7
> Environment: centos/tomcat
> Reporter: Greg Huber
> Assignee: Lukasz Lenart
> Priority: Minor
> Fix For: 2.3.8
>
>
> Hello,
> Think the notifyDeveloper(..) message should be before the return true; statement!
> {code:java}
> protected boolean isExcluded(String paramName) {
> if (!this.excludeParams.isEmpty()) {
> for (Pattern pattern : excludeParams) {
> Matcher matcher = pattern.matcher(paramName);
> if (matcher.matches()) {
> // messsage here?
> return true;
> }
> }
> }
> notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
> return false;
> }
> {code}
--
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: http://www.atlassian.com/software/jira