You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Florent Fourcade (JIRA)" <ji...@apache.org> on 2017/03/31 14:23:42 UTC

[jira] [Commented] (WW-4777) Bug in AliasInterceptor when used to aliases http parameters

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

Florent Fourcade commented on WW-4777:
--------------------------------------

After reviewing the code I found that this [commit|https://github.com/flofourcade/struts/commit/b287a9546a5212bb8c045194f6a6e39aa578017d] [WW-4709|https://issues.apache.org/jira/browse/WW-4709], also fix this issue, thanks to the implementation of the toString() method which in turn calls getValue().
So version > 2.5.5 are not impacted by this issue. Formely, the default toString() from Object was used and injected in target action.

> Bug in AliasInterceptor when used to aliases http parameters
> ------------------------------------------------------------
>
>                 Key: WW-4777
>                 URL: https://issues.apache.org/jira/browse/WW-4777
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.5.5
>            Reporter: Florent Fourcade
>            Priority: Minor
>             Fix For: 2.5.next
>
>
> When using AliasInterceptor to aliases http parameters, the AliasInterceptor put in the value stack an instance of Parameter when it should call getValue() on this instance.
> The problem seems to be located at line 168 of AliasInterceptor : 
> {code}
> value = new Evaluated(contextParameters.get(name));
> {code}
> when it could be something like :
> {code}
> Parameter param = contextParameters.get(name);
> if (param != null){
> value = new Evaluated(param.getValue());
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)