struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso (JIRA)" <j...@apache.org>
Subject [jira] Updated: (WW-3075) StrutsPrepareAndExecuteFilter accesses request parameters before setting request encoding
Date Sun, 05 Apr 2009 23:40:06 GMT

     [ https://issues.apache.org/struts/browse/WW-3075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Musachy Barroso updated WW-3075:
--------------------------------

    Fix Version/s: 2.1.7

> StrutsPrepareAndExecuteFilter accesses request parameters before setting request encoding
> -----------------------------------------------------------------------------------------
>
>                 Key: WW-3075
>                 URL: https://issues.apache.org/struts/browse/WW-3075
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Dispatch Filter
>    Affects Versions: 2.1.6
>            Reporter: Roman Shevchenko
>             Fix For: 2.1.7
>
>
> In StrutsPrepareAndExecuteFilter.doFilter(), method PrepareOperations.createActionContext()
is called before PrepareOperations.setEncodingAndLocale() one. This causes population of value
stack with incorrect data. Same problem exists in StrutsPrepareFilter.
> Suggested patch:
> --- StrutsPrepareAndExecuteFilter.java	Mon Jan 05 20:00:24 2009
> +++ StrutsPrepareAndExecuteFilter.java	Sun Apr 05 18:01:18 2009
> @@ -62,9 +62,9 @@
>          HttpServletResponse response = (HttpServletResponse) res;
>  
>          try {
> +            prepare.setEncodingAndLocale(request, response);
>              prepare.createActionContext(request, response);
>              prepare.assignDispatcherToThread();
> -            prepare.setEncodingAndLocale(request, response);
>              request = prepare.wrapRequest(request);
>              ActionMapping mapping = prepare.findActionMapping(request, response);
>              if (mapping == null) {
> --- StrutsPrepareFilter.java	Mon Jan 05 20:00:24 2009
> +++ StrutsPrepareFilter.java	Sun Apr 05 18:01:34 2009
> @@ -56,9 +56,9 @@
>          HttpServletResponse response = (HttpServletResponse) res;
>  
>          try {
> +            prepare.setEncodingAndLocale(request, response);
>              prepare.createActionContext(request, response);
>              prepare.assignDispatcherToThread();
> -            prepare.setEncodingAndLocale(request, response);
>              request = prepare.wrapRequest(request);
>              prepare.findActionMapping(request, response);
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message