You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Michael Gottschalk (JIRA)" <ji...@apache.org> on 2010/09/22 11:24:33 UTC
[jira] Issue Comment Edited: (WICKET-3070) Method getParameterMap
in CryptedUrlWebRequestCodingStrategy.DecodedUrlRequest is broken
[ https://issues.apache.org/jira/browse/WICKET-3070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913474#action_12913474 ]
Michael Gottschalk edited comment on WICKET-3070 at 9/22/10 5:24 AM:
---------------------------------------------------------------------
The issue # WICKET-524 fixed the ClassCastException in getParameter, but did not fix getParameterMap
was (Author: mgottschalk):
This issue fixed the ClassCastException in getParameter, but did not fix getParameterMap
> Method getParameterMap in CryptedUrlWebRequestCodingStrategy.DecodedUrlRequest is broken
> ----------------------------------------------------------------------------------------
>
> Key: WICKET-3070
> URL: https://issues.apache.org/jira/browse/WICKET-3070
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.7
> Reporter: Michael Gottschalk
> Priority: Critical
>
> The original Method in class org.apache.wicket.Request defines getParameterMap as
> public abstract Map<String, String[]> getParameterMap()
> In DecodedUrlRequest, the method just returns an untyped Map. This map, however, does not always conform to the specification:
> In the constructor, the following code can be found:
> // Add ALL of the params from the decoded 'x' param
> ValueMap params = new ValueMap();
> RequestUtils.decodeParameters(decodedParamReplacement, params);
> parameterMap.putAll(params);
> The method decodeParameters adds Strings (not String Arrays!) to the ValueMap, which are then just copied to the parameterMap.
> This is incorrect, it should add String Arrays instead.
> The method getParameter apparently knows about the problem, since it is checked whether the parameter values are Strings or String Arrays (via instanceof).
> External users of the method getParameterMap, however, cannot know about the problem and must expect that a correctly typed map is returned.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.