You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Maarten Billemont (JIRA)" <ji...@apache.org> on 2010/03/26 06:15:27 UTC
[jira] Commented: (WICKET-2801) User input can inject property
model expressions using StringResourceModel
[ https://issues.apache.org/jira/browse/WICKET-2801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12850011#action_12850011 ]
Maarten Billemont commented on WICKET-2801:
-------------------------------------------
What you are passing as arguments is definitely considered "data" rather than "application code". In that light, it *must* remain untouched by any processing - whether "expected" or not.
Am I to understand that evaluating property expressions is a feature of the arguments? Surely that cannot be the intended effect, for who would ever need their user data (not application code) to get evaluated as property expressions. Conversely, I can think of a very many cases where one *needs* it not to be evaluated as such.
And if indeed it is to be considered "expected", then it should be very clearly noted as such in the documentation with a bold warning sign demanding users escape each of their arguments before passing them along - though truthfully, I do not expect even this will attract the necessary attention of all developers unknowingly dealing with this issue.
> User input can inject property model expressions using StringResourceModel
> --------------------------------------------------------------------------
>
> Key: WICKET-2801
> URL: https://issues.apache.org/jira/browse/WICKET-2801
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.7
> Reporter: Maarten Billemont
> Assignee: Igor Vaynberg
> Priority: Critical
> Attachments: WICKET-2801-1.tbz2
>
>
> Applications that use StringResourceModel to render localized strings using a model and value arguments are subject to a security issue which allows users to perform property model expressions on the given model.
> For instance, the following statement:
> new StringResourceModel( "key", userModel, new Object[] { input.getModelObject() } )
> Would expand property model expressions from input's object against userModel's object, effectively allowing users to access unintended data from userModel's object.
> Consider the localization data:
> key=User ${name} said: {0}
> The user input:
> input.getModelObject() = "My password is ${pass}."
> The StringResourceModel's object would yield a string like:
> User lhunath said: My password is secret
> Find attached test case which illustrates this problem using WicketTester.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.