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

Christian Kaltepoth updated MYFACES-3229:
-----------------------------------------

    Status: Patch Available  (was: Open)

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

        

Reply via email to