You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "zhouyanming (Created) (JIRA)" <ji...@apache.org> on 2012/02/17 01:23:59 UTC

[jira] [Created] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

make ParametersInterceptor.acceptedParamNames public and static
---------------------------------------------------------------

                 Key: WW-3755
                 URL: https://issues.apache.org/jira/browse/WW-3755
             Project: Struts 2
          Issue Type: Improvement
          Components: Core Interceptors
            Reporter: zhouyanming
         Attachments: patch.txt

let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Lukasz Lenart (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210879#comment-13210879 ] 

Lukasz Lenart commented on WW-3755:
-----------------------------------

@Maurizio why cannot be more than one ?
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210899#comment-13210899 ] 

Maurizio Cucchiara commented on WW-3755:
----------------------------------------

ATM there is no way to change the value of {{acceptedParamNames}}: it's private and nothing inside the code tries to change its value.
FWIW the code:
{code}
private String acceptedParamNames = "\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['\\w+'\\])|(\\('\\w+'\\)))*";
private Pattern acceptedPattern = Pattern.compile(acceptedParamNames);
{code}
could be changed to
{code}
private Pattern acceptedPattern = Pattern.compile("\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['\\w+'\\])|(\\('\\w+'\\)))*");
{code}
without any side effects (it could also be final)

                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "zhouyanming (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212238#comment-13212238 ] 

zhouyanming edited comment on WW-3755 at 2/21/12 12:36 AM:
-----------------------------------------------------------

@Maurizio ,thanks very much, if setParameter() make sense,why ParametersInterceptor needs "\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['\\w+'\\])|(\\('\\w+'\\)))*"

line 293 in ParametersInterceptor : newStack.setParameter(name, value);
                
      was (Author: quaff):
    @Maurizio ,thanks very much, setParameter() make sense
                  
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211765#comment-13211765 ] 

Maurizio Cucchiara commented on WW-3755:
----------------------------------------

NB: there are two families of parameter (and relative accessor):
* accepted
* accept

I think that this is the reason of such misunderstanding.
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219985#comment-13219985 ] 

Maurizio Cucchiara commented on WW-3755:
----------------------------------------

@zhouyanming setParameter mitigates some OGNL risks (like evaluation expression, see [s2-009|http://struts.apache.org/2.3.1.2/docs/s2-009.html] for further details), the regexp pattern limits the variable name which may be accepted.

@Lukasz
Good catch!
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Lukasz Lenart (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210493#comment-13210493 ] 

Lukasz Lenart edited comment on WW-3755 at 2/18/12 8:30 AM:
------------------------------------------------------------

Interceptors are created per stack, so for each different stack you can have a different acceptedParamNames
                
      was (Author: lukaszlenart):
    Interceptors are created per stack, so for each different stack you can have a different acceptedPramNames
                  
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210143#comment-13210143 ] 

Maurizio Cucchiara commented on WW-3755:
----------------------------------------

{quote}It cannot be static as there can be multiple instances of a given interceptor, IIRC.{quote}
@Dave I don't get you (mostly because I went to bed late yesterday), what's the matter with a constant shared by multiple instances?
@zhouyanming may I ask you what is your use case and why should expose the string pattern be so useful (I guess there are many others way to achieve what you're looking for, maybe we could find out the best way)?
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "zhouyanming (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212238#comment-13212238 ] 

zhouyanming commented on WW-3755:
---------------------------------

@Maurizio ,thanks very much, setParameter() make sense
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-3755:
------------------------------

    Fix Version/s: 2.3.7
    
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>             Fix For: 2.3.7
>
>         Attachments: patch.txt, WW-3755.patch
>
>
> let it can be referenced by other classes

--
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

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Dave Newton (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13209918#comment-13209918 ] 

Dave Newton commented on WW-3755:
---------------------------------

It cannot be static as there can be multiple instances of a given interceptor, IIRC.
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Lukasz Lenart (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210493#comment-13210493 ] 

Lukasz Lenart commented on WW-3755:
-----------------------------------

Interceptors are created per stack, so for each different stack you can have a different acceptedPramNames
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "zhouyanming (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

zhouyanming updated WW-3755:
----------------------------

    Attachment: WW-3755.patch

this is a better patch
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "zhouyanming (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212230#comment-13212230 ] 

zhouyanming commented on WW-3755:
---------------------------------

@Maurizio
I want reuse this String: 
public static final String defaultAcceptedParamNames = "\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['\\w+'\\])|(\\('\\w+'\\)))*";


if struts has update it's value,I needn't modify my code.
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211759#comment-13211759 ] 

Maurizio Cucchiara commented on WW-3755:
----------------------------------------

OK,
now I'm really confused.
Your patch has referenced a private String until last patch (which IMHO is shareable among many instances), now you're talking about a pattern.
Have you considered to extend ParametersInterceptor and overwrite setParameters method?

Anyway for security reason, you should change the code below from: 
{code}
temp.setValue(entry.getKey(), entry.getValue());
{code}
to:
{code}
temp.setParameter(entry.getKey(), entry.getValue());
{code}
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211764#comment-13211764 ] 

Maurizio Cucchiara commented on WW-3755:
----------------------------------------

@Rene
The {{setAcceptParamNames}}, which I'm pasting below for your convenience, is not the {{acceptedParamNames}} setter, and it never refers it (in very truth nothing refers {{acceptedParamNames}} aside from {{acceptedPattern}}.

{code}
public void setAcceptParamNames(String commaDelim) {
        Collection<String> acceptPatterns = ArrayUtils.asCollection(commaDelim);
        if (acceptPatterns != null) {
            acceptParams = new HashSet<Pattern>();
            for (String pattern : acceptPatterns) {
                acceptParams.add(Pattern.compile(pattern));
            }
        }
    }
{code}
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "zhouyanming (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211667#comment-13211667 ] 

zhouyanming commented on WW-3755:
---------------------------------

@Maurizio, I want reuse acceptedPattern for security in my action class
[code]
			ValueStack temp = valueStackFactory.createValueStack();
			temp.set(getEntityName(), entity);
			Map<String, Object> context = temp.getContext();
			Map<String, Object> parameters = ActionContext.getContext()
					.getParameters();
			try {
				ReflectionContextState.setCreatingNullObjects(context, true);
				ReflectionContextState.setDenyMethodExecution(context, true);
				for (Map.Entry<String, Object> entry : parameters.entrySet())
					if (acceptedPattern.matcher(entry.getKey()).matches())
						temp.setValue(entry.getKey(), entry.getValue());
			} finally {
				ReflectionContextState.setCreatingNullObjects(context, false);
				ReflectionContextState.setDenyMethodExecution(context, false);
			}
[/code]
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "zhouyanming (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211667#comment-13211667 ] 

zhouyanming edited comment on WW-3755 at 2/20/12 4:54 AM:
----------------------------------------------------------

@Maurizio, I want reuse acceptedPattern for security in my action class
{code:java}
			ValueStack temp = valueStackFactory.createValueStack();
			temp.set(getEntityName(), entity);
			Map<String, Object> context = temp.getContext();
			Map<String, Object> parameters = ActionContext.getContext()
					.getParameters();
			try {
				ReflectionContextState.setCreatingNullObjects(context, true);
				ReflectionContextState.setDenyMethodExecution(context, true);
				for (Map.Entry<String, Object> entry : parameters.entrySet())
					if (acceptedPattern.matcher(entry.getKey()).matches())
						temp.setValue(entry.getKey(), entry.getValue());
			} finally {
				ReflectionContextState.setCreatingNullObjects(context, false);
				ReflectionContextState.setDenyMethodExecution(context, false);
			}
{code}
                
      was (Author: quaff):
    @Maurizio, I want reuse acceptedPattern for security in my action class
[code]
			ValueStack temp = valueStackFactory.createValueStack();
			temp.set(getEntityName(), entity);
			Map<String, Object> context = temp.getContext();
			Map<String, Object> parameters = ActionContext.getContext()
					.getParameters();
			try {
				ReflectionContextState.setCreatingNullObjects(context, true);
				ReflectionContextState.setDenyMethodExecution(context, true);
				for (Map.Entry<String, Object> entry : parameters.entrySet())
					if (acceptedPattern.matcher(entry.getKey()).matches())
						temp.setValue(entry.getKey(), entry.getValue());
			} finally {
				ReflectionContextState.setCreatingNullObjects(context, false);
				ReflectionContextState.setDenyMethodExecution(context, false);
			}
[/code]
                  
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "zhouyanming (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220656#comment-13220656 ] 

zhouyanming commented on WW-3755:
---------------------------------

@Maurizio, the regexp pattern was introduced because s2-009 ,now we have setParameter(),is regexp pattern necessary any more?
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "zhouyanming (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

zhouyanming updated WW-3755:
----------------------------

    Attachment: patch.txt

this is patch
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Rene Gielen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210986#comment-13210986 ] 

Rene Gielen commented on WW-3755:
---------------------------------

Maurizio, are you sure you saw 
public void setAcceptParamNames(String commaDelim)
which is the instance based setter for the property? As Lukasz and Dave already mentioned, this parameter can be changed per invocation within any given stack, which is a good thing.
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Lukasz Lenart (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212411#comment-13212411 ] 

Lukasz Lenart commented on WW-3755:
-----------------------------------

So maybe it would be better to move all the default regexps to dedicated class, like Constants or Regexps.
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: WW-3755.patch, patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210874#comment-13210874 ] 

Maurizio Cucchiara commented on WW-3755:
----------------------------------------

Lukasz, I got what you mean, but even if you have more than one instance of PI, there cannot be more than one value for acceptedParamNames (the one assigned in the class).
(Again ATM I don't see the usefulness in making it public).
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3755) make ParametersInterceptor.acceptedParamNames public and static

Posted by "Dave Newton (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210878#comment-13210878 ] 

Dave Newton commented on WW-3755:
---------------------------------

If it's static, acceptedParamNames would be shared across all instances. Since there may be multiple instances, why couldn't there be different values for acceptedParamNames?
                
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira