You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Christoph Leiter (Updated) (JIRA)" <ji...@apache.org> on 2012/02/08 13:57:59 UTC
[jira] [Updated] (WICKET-4398) Any empty url-parameter will make
wicket 1.5 crash
[ https://issues.apache.org/jira/browse/WICKET-4398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christoph Leiter updated WICKET-4398:
-------------------------------------
Attachment: WICKET-4398.patch
Problem seems to be in Url class which allows empty parameters. Adding patch.
> Any empty url-parameter will make wicket 1.5 crash
> --------------------------------------------------
>
> Key: WICKET-4398
> URL: https://issues.apache.org/jira/browse/WICKET-4398
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.3
> Reporter: Johannes Odland
> Attachments: WICKET-4398.patch
>
>
> Adding an empty parameter to the query string will make wicket crash.
> http://www.example.com/?oneParam&
> How to reproduce in test:
> PageParameters params = new PageParameters();
> params.set("","");
> params.getAllNamed();
> Cause:
> Wicket accepts empty parameters, but when encoding the url for a rendered page it will call params.getAllNamed().
> params.getAllNamed() instantiates new NamedPairs, which calls Args.notEmpty() on the key during instantiation, causing the application to crash.
> The NamedPair constructor should probably allow empty string as a key, and call Args.notNull() on the key in stead.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira