[
https://issues.apache.org/jira/browse/SLING-6094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Radu Cotescu updated SLING-6094:
--------------------------------
Description:
HTL can generate invalid Java code by using user-supplied input or markup
elements as fragments for variable names, leading to failed script executions.
This could happen with the {{data-sly-attribute}} plug-in, when the value is a
map and the plug-in has to analyse previously defined attributes:
{code:html}
<img src="" v-bind:src="abc" data-sly-attribute="${logic.hello}" />
{code}
or with user-defined script variable names:
{code:html}
<div data-sly-test.jcr:title="${1>0}">correctly escaped variable</div>
{code}
was:
HTL can generate invalid Java code by using user-supplied input or markup
elements as fragments for variable names.
This could happen with the {{data-sly-attribute}} plug-in, when the value is a
map and the plug-in has to analyse previously defined attributes:
{code:html}
<img src="" v-bind:src="abc" data-sly-attribute="${logic.hello}" />
{code}
or with user-defined script variable names:
{code:html}
<div data-sly-test.jcr:title="${1>0}">correctly escaped variable</div>
{code}
> HTL can generate invalid Java code by using user-supplied input
> ---------------------------------------------------------------
>
> Key: SLING-6094
> URL: https://issues.apache.org/jira/browse/SLING-6094
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Affects Versions: Scripting Sightly Engine 1.0.18
> Reporter: Mark J. Becker
> Assignee: Radu Cotescu
> Fix For: Scripting HTL Java Compiler 1.0.2, Scripting HTL Engine
> 1.0.22
>
>
> HTL can generate invalid Java code by using user-supplied input or markup
> elements as fragments for variable names, leading to failed script executions.
> This could happen with the {{data-sly-attribute}} plug-in, when the value is
> a map and the plug-in has to analyse previously defined attributes:
> {code:html}
> <img src="" v-bind:src="abc" data-sly-attribute="${logic.hello}" />
> {code}
> or with user-defined script variable names:
> {code:html}
> <div data-sly-test.jcr:title="${1>0}">correctly escaped variable</div>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)