[ 
https://issues.apache.org/struts/browse/WW-2030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41385
 ] 

Andrea Vettori commented on WW-2030:
------------------------------------

Just realized that my patch will break calls to 
TextParseUtil.translateVariables that have more than one %{something} at the 
same level.
For example it does not work when expression is

"%{foo} %{bar}"

since if foo doesn't eval to another %{something} string, when it's time to 
eval %{bar} we are on the second loop.

I'll try to fix it splitting the expression and processing %{something} that 
are at the same level in the same main loop iteration.

Does anyone know how to LOG in xwork ? I haven't find a line of loggin.... but 
I think it would be nice to be able to see that an expression was not processed 
because of the recursive limitation.

Thanks

> DOS (continuos memory eating on an infinte loop) on form fields
> ---------------------------------------------------------------
>
>                 Key: WW-2030
>                 URL: https://issues.apache.org/struts/browse/WW-2030
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Value Stack
>    Affects Versions: 2.0.8
>            Reporter: Andrea Vettori
>            Priority: Critical
>         Attachments: Struts.diff, Struts2.diff, translateVariable.txt, 
> translateVariable2.txt, xwork.diff, xwork2.diff
>
>
> On a form with
> <s:textfield name="xxx">
> if the user enters %{xxx} as the value then 
> com/opensymphony/xwork2/util/TextParseUtil.translateVariables enters an 
> infinite loop eating about 1GB of ram in one second on my server.

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

Reply via email to