You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2011/08/08 23:16:34 UTC
[jira] [Updated] (MYFACES-3229)
ServletExternalContextImpl.encodeRedirectURL() doesn't handle existing
query parameters correctly
[ https://issues.apache.org/jira/browse/MYFACES-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated MYFACES-3229:
------------------------------------
Resolution: Fixed
Fix Version/s: 2.1.2
2.0.8
Assignee: Leonardo Uribe
Status: Resolved (was: Patch Available)
> ServletExternalContextImpl.encodeRedirectURL() doesn't handle existing query parameters correctly
> -------------------------------------------------------------------------------------------------
>
> Key: MYFACES-3229
> URL: https://issues.apache.org/jira/browse/MYFACES-3229
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.1.1
> Reporter: Christian Kaltepoth
> Assignee: Leonardo Uribe
> Fix For: 2.0.8, 2.1.2
>
> Attachments: MYFACES-3229-failing-unit-test.patch, MYFACES-3229-fix.patch
>
>
> ServletExternalContextImpl.encodeRedirectURL() doesn't work correctly if the base URL already contains encoded query parameters. In this case the resulting URL contains the query parameter encoded twice, which completely breaks them.
> Take a look at this example:
> externalContext.encodeRedirectURL("/test?p1=a+b", null);
> Result ----> /test?p1=a%2Bb
> Another example are encoded ampersand:
> externalContext.encodeRedirectURL("/test?p1=a%26b", null);
> Result ----> /test?p1=a%2526b
> The root cause of the problem seems to be that ServletExternalContextImpl.encodeURL() doesn't decode the query parameters while parsing the base URL.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira