Uploaded image for project: 'UY'
  1. UY
  2. UY-652

Invalid expression in group attribute statement breaks UI

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: v2.4.0
    • Labels:
      None
    • Story Points:
      1

      Description

      Quite severe as without fix the UI is broken for good... Likely only REST API update can help.

       

      Example expr:

       

      attr['foo']

      2017-11-20T21:42:53,508 [qtp1521553533-35] FATAL unity.server.web.GroupDetailsComponent: Problem retrieving group contents of /
      org.mvel2.PropertyAccessException: [Error: could not access: email; in class: java.util.HashMap]
      [Near : {... attr[email] ....}]
                        ^
      [Line: 1, Column: 6]
              at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:706) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:699) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:360) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:163) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(DynamicOptimizer.java:80) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.ast.ASTNode.optimize(ASTNode.java:159) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getCollectionProperty(ReflectiveAccessorOptimizer.java:757) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:366) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:163) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(DynamicOptimizer.java:80) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.ast.ASTNode.optimize(ASTNode.java:159) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42) ~[mvel2-2.3.2.Final.jar:?]
              at org.mvel2.MVEL.executeExpression(MVEL.java:921) ~[mvel2-2.3.2.Final.jar:?]
              at pl.edu.icm.unity.engine.attribute.AttributeStatementProcessor.evaluateStatementValue(AttributeStatementProcessor.java:383) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.attribute.AttributeStatementProcessor.processAttributeStatement(AttributeStatementProcessor.java:303) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.attribute.AttributeStatementProcessor.processAttributeStatements(AttributeStatementProcessor.java:254) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.attribute.AttributeStatementProcessor.collectUpOrDownAttributes(AttributeStatementProcessor.java:190) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.attribute.AttributeStatementProcessor.getEffectiveAttributes(AttributeStatementProcessor.java:109) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.attribute.AttributesHelper.getAllAttributesAsMap(AttributesHelper.java:125) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.authz.AuthorizationManagerImpl.getAllAttributes(AuthorizationManagerImpl.java:310) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.authz.AuthorizationManagerImpl.establishRoles(AuthorizationManagerImpl.java:274) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.authz.AuthorizationManagerImpl.getCapabilities(AuthorizationManagerImpl.java:211) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.authz.AuthorizationManagerImpl.checkAuthorizationInternal(AuthorizationManagerImpl.java:247) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]
              at pl.edu.icm.unity.engine.authz.AuthorizationManagerImpl.checkAuthorization(AuthorizationManagerImpl.java:185) ~[unity-server-engine-2.4.0-SNAPSHOT.jar:?]

        Attachments

          Activity

            People

            • Assignee:
              golbi Krzysztof Benedyczak
              Reporter:
              golbi Krzysztof Benedyczak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: