Bug 1171809 - ResolveExpressionHandler is overly simplistic in expression resolution
Summary: ResolveExpressionHandler is overly simplistic in expression resolution
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Domain Management
Version: 6.3.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: DR13
: EAP 6.4.0
Assignee: Brian Stansberry
QA Contact: Petr Kremensky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-08 16:23 UTC by Brian Stansberry
Modified: 2019-08-19 12:43 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFCORE-451 0 Major Resolved ResolveExpressionHandler is overly simplistic in expression resolution 2015-09-01 13:27:02 UTC

Description Brian Stansberry 2014-12-08 16:23:10 UTC
Description of problem:

ResolveExpressionHandler deliberately does not make use of the full range of expression resolutions sources, because by design the intent is not to support vault resolution.
However, the way it implements that limitation is by simply calling ModelNode.resolve(). That is overly restrictive, as DMR alone does not support other valid resolution features, i.e. nested expressions and recursive resolution.
Fix is to switch the handler to use an ExpressionResolver impl, just one that doesn't plug in the vault resolver.

Version-Release number of selected component (if applicable):

6.4.0.DR12, although similar issues exist in 6.3, just not reproducible using the nested expression example below, as nested expressions aren't supported there.

How reproducible:

Always.

Steps to Reproduce:
1. Add 3 system properties:

[standalone@localhost:9999 /] /system-property=A:add(value=a)
{"outcome" => "success"}
[standalone@localhost:9999 /] /system-property=B:add(value=b){"outcome" => "success"}
[standalone@localhost:9999 /] /system-property=ab:add(value=asd)
{"outcome" => "success"}

2.

Use the "resolve-expressions" op to try and resolve a nested expression:

[standalone@localhost:9999 /] :resolve-expression(expression=${${A}b})


Actual results:

{
"outcome" => "failed",
"failure-description" => "JBAS014802: Cannot resolve expression '${${A}b}'",
"rolled-back" => true
}

Expected results:

{ "outcome" => "success", "result" => "asd" }

Comment 3 Kabir Khan 2014-12-09 14:53:18 UTC
https://github.com/jbossas/jboss-eap/pull/2139

Comment 5 Petr Kremensky 2014-12-10 08:39:17 UTC
Verified on EAP 6.4.0.DR13


Note You need to log in before you can comment on or make changes to this bug.