[
https://issues.apache.org/jira/browse/MYFACES-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067054#comment-13067054
]
Christian Kaltepoth commented on MYFACES-3229:
----------------------------------------------
Sorry, I forgot to mention that both MyFaces 2.0.x and 2.1.x seem to be
affected!
> 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
> Attachments: MYFACES-3229-failing-unit-test.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