Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-9389

Fix entity decoding from expressions in operation chain

    XMLWordPrintable

    Details

      Description

      Currently, only > and > are decoded from operation parameters.
      This may produce errors when using & for example with this stacktrace

      [OperationActionBean] org.nuxeo.ecm.automation.OperationException: Failed to invoke operation Document.SetProperty
      org.nuxeo.ecm.automation.OperationException: Failed to invoke operation Document.SetProperty
      ...
      Caused by: [Error: could not access: amp; in class: null]
      [Near : {... Unknown ....}]
                   ^
      [Line: 1, Column: 0]
      	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:611)
      	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:323)
      	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:135)
      	at org.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(DynamicOptimizer.java:66)
      	at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:139)
      	at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:111)
      	at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
      	at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:108)
      	at org.mvel2.MVEL.executeExpression(MVEL.java:1057)
      	at org.nuxeo.ecm.automation.core.scripting.MvelExpression.eval(MvelExpression.java:38)
      	at org.nuxeo.ecm.automation.core.impl.OperationTypeImpl.inject(OperationTypeImpl.java:164)
      	at org.nuxeo.ecm.automation.core.impl.OperationTypeImpl.newInstance(OperationTypeImpl.java:155)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:114)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:132)
      	... 110 more
      

      We need to decode all XML entities.

        Attachments

          Activity

            People

            • Assignee:
              tmartins Thierry Martins
              Reporter:
              tmartins Thierry Martins
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: