You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Rodrigo Benenson (JIRA)" <ji...@apache.org> on 2009/02/24 03:06:02 UTC

[jira] Created: (WICKET-2125) MixedParamUrlCodingStrategy fails when using a %2F in the URL

MixedParamUrlCodingStrategy fails when using a %2F in the URL
-------------------------------------------------------------

                 Key: WICKET-2125
                 URL: https://issues.apache.org/jira/browse/WICKET-2125
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4-RC2
         Environment: Ubuntu 8.10, tomcat6 
            Reporter: Rodrigo Benenson
            Priority: Critical


Symptom: when clicking on a link created by Wicket the page appears blank. No exception, no error page, only blank.


Identified cause:
I'm using

mount(new MixedParamUrlCodingStrategy("my_page", MyPage.class, new String[]{"key"} ) );

and creating the URL using

PageParameters page_parameters = new PageParameters();
page_parameters.add("key", key);
final String the_link_url = RequestUtils.toAbsolutePath(urlFor(MyPage.class, page_parameters).toString());
add(new ExternalLink("the_link", the_link_url));

in some cases the key string can contain a "/" character. This is not a problem since Wicket take cares of encoding the url correctly.

For instance, if 
final String key="ab/c";

then the generated link will be
http://my_server/my_page/ab%2Fc

but this page will not render as expected. MixedParamUrlCodingStrategy is bugged.

Other values for the encoded key string work fine:
http://my_server/my_page/abc
http://my_server/my_page/ab%2Ec

all work fine.

%2F seems to be the cause of the symptom.


Workaround:
Use QueryStringUrlCodingStrategy instead
mount(new QueryStringUrlCodingStrategy("my_page", MyPage.class ) );

will generate
http://my_server/my_page?key=ab%2Fc

which works fine, as expected

Patch:
MixedParamUrlCodingStrategy needs to be fixed.


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


[jira] Updated: (WICKET-2125) MixedParamUrlCodingStrategy fails when using a %2F in the URL

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Thomerson updated WICKET-2125:
-------------------------------------

    Attachment: patch.txt

I started by trying to reproduce with this test case - could not reproduce.  If we can reproduce, we should modify this test case to also reproduce it so that we make sure it does not come back.

> MixedParamUrlCodingStrategy fails when using a %2F in the URL
> -------------------------------------------------------------
>
>                 Key: WICKET-2125
>                 URL: https://issues.apache.org/jira/browse/WICKET-2125
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC2
>         Environment: Ubuntu 8.10, tomcat6 
>            Reporter: Rodrigo Benenson
>            Assignee: Jeremy Thomerson
>            Priority: Critical
>         Attachments: bugproducer.tar.gz, patch.txt
>
>
> Symptom: when clicking on a link created by Wicket the page appears blank. No exception, no error page, only blank.
> Identified cause:
> I'm using
> mount(new MixedParamUrlCodingStrategy("my_page", MyPage.class, new String[]{"key"} ) );
> and creating the URL using
> PageParameters page_parameters = new PageParameters();
> page_parameters.add("key", key);
> final String the_link_url = RequestUtils.toAbsolutePath(urlFor(MyPage.class, page_parameters).toString());
> add(new ExternalLink("the_link", the_link_url));
> in some cases the key string can contain a "/" character. This is not a problem since Wicket take cares of encoding the url correctly.
> For instance, if 
> final String key="ab/c";
> then the generated link will be
> http://my_server/my_page/ab%2Fc
> but this page will not render as expected. MixedParamUrlCodingStrategy is bugged.
> Other values for the encoded key string work fine:
> http://my_server/my_page/abc
> http://my_server/my_page/ab%2Ec
> all work fine.
> %2F seems to be the cause of the symptom.
> Workaround:
> Use QueryStringUrlCodingStrategy instead
> mount(new QueryStringUrlCodingStrategy("my_page", MyPage.class ) );
> will generate
> http://my_server/my_page?key=ab%2Fc
> which works fine, as expected
> Patch:
> MixedParamUrlCodingStrategy needs to be fixed.

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


[jira] Assigned: (WICKET-2125) MixedParamUrlCodingStrategy fails when using a %2F in the URL

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Thomerson reassigned WICKET-2125:
----------------------------------------

    Assignee: Jeremy Thomerson

> MixedParamUrlCodingStrategy fails when using a %2F in the URL
> -------------------------------------------------------------
>
>                 Key: WICKET-2125
>                 URL: https://issues.apache.org/jira/browse/WICKET-2125
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC2
>         Environment: Ubuntu 8.10, tomcat6 
>            Reporter: Rodrigo Benenson
>            Assignee: Jeremy Thomerson
>            Priority: Critical
>
> Symptom: when clicking on a link created by Wicket the page appears blank. No exception, no error page, only blank.
> Identified cause:
> I'm using
> mount(new MixedParamUrlCodingStrategy("my_page", MyPage.class, new String[]{"key"} ) );
> and creating the URL using
> PageParameters page_parameters = new PageParameters();
> page_parameters.add("key", key);
> final String the_link_url = RequestUtils.toAbsolutePath(urlFor(MyPage.class, page_parameters).toString());
> add(new ExternalLink("the_link", the_link_url));
> in some cases the key string can contain a "/" character. This is not a problem since Wicket take cares of encoding the url correctly.
> For instance, if 
> final String key="ab/c";
> then the generated link will be
> http://my_server/my_page/ab%2Fc
> but this page will not render as expected. MixedParamUrlCodingStrategy is bugged.
> Other values for the encoded key string work fine:
> http://my_server/my_page/abc
> http://my_server/my_page/ab%2Ec
> all work fine.
> %2F seems to be the cause of the symptom.
> Workaround:
> Use QueryStringUrlCodingStrategy instead
> mount(new QueryStringUrlCodingStrategy("my_page", MyPage.class ) );
> will generate
> http://my_server/my_page?key=ab%2Fc
> which works fine, as expected
> Patch:
> MixedParamUrlCodingStrategy needs to be fixed.

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


[jira] Work logged: (WICKET-2125) MixedParamUrlCodingStrategy fails when using a %2F in the URL

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#action_10804 ]

Jeremy Thomerson logged work on WICKET-2125:
--------------------------------------------

                Author: Jeremy Thomerson
            Created on: 07/Mar/09 07:35 PM
            Start Date: 07/Mar/09 07:34 PM
    Worklog Time Spent: 0.75h 
      Work Description: Tried to reproduce with attached test case - no bueno.
Tried using a quickstart (attached) with exact steps described in bug - no bueno.

Seems to either be fixed, or there is something I'm missing, or something missing from the bug report.

Issue Time Tracking
-------------------

            Time Spent: 0.75h
    Remaining Estimate: 0h

> MixedParamUrlCodingStrategy fails when using a %2F in the URL
> -------------------------------------------------------------
>
>                 Key: WICKET-2125
>                 URL: https://issues.apache.org/jira/browse/WICKET-2125
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC2
>         Environment: Ubuntu 8.10, tomcat6 
>            Reporter: Rodrigo Benenson
>            Assignee: Jeremy Thomerson
>            Priority: Critical
>         Attachments: bugproducer.tar.gz, patch.txt
>
>          Time Spent: 0.75h
>  Remaining Estimate: 0h
>
> Symptom: when clicking on a link created by Wicket the page appears blank. No exception, no error page, only blank.
> Identified cause:
> I'm using
> mount(new MixedParamUrlCodingStrategy("my_page", MyPage.class, new String[]{"key"} ) );
> and creating the URL using
> PageParameters page_parameters = new PageParameters();
> page_parameters.add("key", key);
> final String the_link_url = RequestUtils.toAbsolutePath(urlFor(MyPage.class, page_parameters).toString());
> add(new ExternalLink("the_link", the_link_url));
> in some cases the key string can contain a "/" character. This is not a problem since Wicket take cares of encoding the url correctly.
> For instance, if 
> final String key="ab/c";
> then the generated link will be
> http://my_server/my_page/ab%2Fc
> but this page will not render as expected. MixedParamUrlCodingStrategy is bugged.
> Other values for the encoded key string work fine:
> http://my_server/my_page/abc
> http://my_server/my_page/ab%2Ec
> all work fine.
> %2F seems to be the cause of the symptom.
> Workaround:
> Use QueryStringUrlCodingStrategy instead
> mount(new QueryStringUrlCodingStrategy("my_page", MyPage.class ) );
> will generate
> http://my_server/my_page?key=ab%2Fc
> which works fine, as expected
> Patch:
> MixedParamUrlCodingStrategy needs to be fixed.

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


[jira] Updated: (WICKET-2125) MixedParamUrlCodingStrategy fails when using a %2F in the URL

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Thomerson updated WICKET-2125:
-------------------------------------

    Attachment: bugproducer.tar.gz

This is a quickstart using 1.4-SNAPSHOT (March 7, 2009) - could not reproduce.

> MixedParamUrlCodingStrategy fails when using a %2F in the URL
> -------------------------------------------------------------
>
>                 Key: WICKET-2125
>                 URL: https://issues.apache.org/jira/browse/WICKET-2125
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC2
>         Environment: Ubuntu 8.10, tomcat6 
>            Reporter: Rodrigo Benenson
>            Assignee: Jeremy Thomerson
>            Priority: Critical
>         Attachments: bugproducer.tar.gz
>
>
> Symptom: when clicking on a link created by Wicket the page appears blank. No exception, no error page, only blank.
> Identified cause:
> I'm using
> mount(new MixedParamUrlCodingStrategy("my_page", MyPage.class, new String[]{"key"} ) );
> and creating the URL using
> PageParameters page_parameters = new PageParameters();
> page_parameters.add("key", key);
> final String the_link_url = RequestUtils.toAbsolutePath(urlFor(MyPage.class, page_parameters).toString());
> add(new ExternalLink("the_link", the_link_url));
> in some cases the key string can contain a "/" character. This is not a problem since Wicket take cares of encoding the url correctly.
> For instance, if 
> final String key="ab/c";
> then the generated link will be
> http://my_server/my_page/ab%2Fc
> but this page will not render as expected. MixedParamUrlCodingStrategy is bugged.
> Other values for the encoded key string work fine:
> http://my_server/my_page/abc
> http://my_server/my_page/ab%2Ec
> all work fine.
> %2F seems to be the cause of the symptom.
> Workaround:
> Use QueryStringUrlCodingStrategy instead
> mount(new QueryStringUrlCodingStrategy("my_page", MyPage.class ) );
> will generate
> http://my_server/my_page?key=ab%2Fc
> which works fine, as expected
> Patch:
> MixedParamUrlCodingStrategy needs to be fixed.

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


[jira] Resolved: (WICKET-2125) MixedParamUrlCodingStrategy fails when using a %2F in the URL

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Thomerson resolved WICKET-2125.
--------------------------------------

    Resolution: Cannot Reproduce

> MixedParamUrlCodingStrategy fails when using a %2F in the URL
> -------------------------------------------------------------
>
>                 Key: WICKET-2125
>                 URL: https://issues.apache.org/jira/browse/WICKET-2125
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC2
>         Environment: Ubuntu 8.10, tomcat6 
>            Reporter: Rodrigo Benenson
>            Assignee: Jeremy Thomerson
>            Priority: Critical
>         Attachments: bugproducer.tar.gz, patch.txt
>
>
> Symptom: when clicking on a link created by Wicket the page appears blank. No exception, no error page, only blank.
> Identified cause:
> I'm using
> mount(new MixedParamUrlCodingStrategy("my_page", MyPage.class, new String[]{"key"} ) );
> and creating the URL using
> PageParameters page_parameters = new PageParameters();
> page_parameters.add("key", key);
> final String the_link_url = RequestUtils.toAbsolutePath(urlFor(MyPage.class, page_parameters).toString());
> add(new ExternalLink("the_link", the_link_url));
> in some cases the key string can contain a "/" character. This is not a problem since Wicket take cares of encoding the url correctly.
> For instance, if 
> final String key="ab/c";
> then the generated link will be
> http://my_server/my_page/ab%2Fc
> but this page will not render as expected. MixedParamUrlCodingStrategy is bugged.
> Other values for the encoded key string work fine:
> http://my_server/my_page/abc
> http://my_server/my_page/ab%2Ec
> all work fine.
> %2F seems to be the cause of the symptom.
> Workaround:
> Use QueryStringUrlCodingStrategy instead
> mount(new QueryStringUrlCodingStrategy("my_page", MyPage.class ) );
> will generate
> http://my_server/my_page?key=ab%2Fc
> which works fine, as expected
> Patch:
> MixedParamUrlCodingStrategy needs to be fixed.

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