Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6094

HTL can generate invalid Java code by using user-supplied input

    XMLWordPrintableJSON

Details

    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 (see v-bind:src):

      <img src="" v-bind:src="abc" data-sly-attribute="${logic.hello}" />
      

      or with user-defined script variable names:

      <div data-sly-test.jcr:title="${1>0}">correctly escaped variable</div>
      

      Attachments

        Issue Links

          Activity

            People

              radu Radu Cotescu
              marbec Mark J. Becker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: