struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yasser Zamani (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4966) com.opensymphony.xwork2.ognl.OgnlValueStack findValue doesn't work
Date Sun, 07 Oct 2018 08:28:00 GMT

    [ https://issues.apache.org/jira/browse/WW-4966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640996#comment-16640996
] 

Yasser Zamani commented on WW-4966:
-----------------------------------

[~sancho0410], I tried to reproduce this issue (as more as possible like your one) on Struts
showcase webapp via following patch but wasn't successful. As Lukasz mentioned, the showcase
webapp works and prints:
{quote} top exists :) and TemplateDir is customTemplateDir
{quote}
Shouldn't `niveau` be `parameters.niveau` in your ftl? Also, shouldn't following being used?

{code:xml}
<s:param name="affectation" value="%{'filtreActeur'}" />
{code}
PATCH
{code:none}
Index: apps/showcase/src/main/webapp/customTemplateDir/customTheme/ftlCustomTemplate.ftl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- apps/showcase/src/main/webapp/customTemplateDir/customTheme/ftlCustomTemplate.ftl	(revision
53825df9fbf13dd8a0b30e8183486c6d8dacf371)
+++ apps/showcase/src/main/webapp/customTemplateDir/customTheme/ftlCustomTemplate.ftl	(date
1538899395680)
@@ -22,6 +22,7 @@
 <p>
 Freemarker Custom Template -
 parameter 'paramName' - ${parameters.paramName}
+parameter 'paramValue' - <#if stack.findValue(parameters.paramValue + 'op')?exists>top
exists :) and TemplateDir is ${stack.findValue(parameters.paramValue + 'op.templateDir')}</#if>
 </p>
 </div>
 
Index: apps/showcase/src/main/webapp/WEB-INF/tags/ui/componentTagExample.jsp
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- apps/showcase/src/main/webapp/WEB-INF/tags/ui/componentTagExample.jsp	(revision 53825df9fbf13dd8a0b30e8183486c6d8dacf371)
+++ apps/showcase/src/main/webapp/WEB-INF/tags/ui/componentTagExample.jsp	(date 1538898773604)
@@ -47,6 +47,7 @@
 			        templateDir="customTemplateDir"
 			        template="ftlCustomTemplate">
 			        <s:param name="paramName" value="%{'paramValue1'}" />
+					<s:param name="paramValue" value="%{'t'}" />
 			    </s:component>
 			<p/>
 
{code}

> com.opensymphony.xwork2.ognl.OgnlValueStack findValue doesn't work
> ------------------------------------------------------------------
>
>                 Key: WW-4966
>                 URL: https://issues.apache.org/jira/browse/WW-4966
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.35
>            Reporter: Guillaume SANCHEZ
>            Priority: Major
>
> Hi,
> since 2.3.35 Struts2 version the "com.opensymphony.xwork2.ognl." is exclude.
> In template some people use OgnlValueStack function like .findValue(String).
> Have U some fix for use this function in .ftl and .jsp ? This class have security breach
?
>  
> Thanks U



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message