This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 988283 - CLI GUI - write attribute dialog for string value should enclose value in generated command to double quotes
CLI GUI - write attribute dialog for string value should enclose value in gen...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CLI (Show other bugs)
6.1.1
Unspecified Unspecified
unspecified Severity medium
: DR2
: EAP 6.3.0
Assigned To: Alexey Loubyansky
:
: 1054214 1066228 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-25 05:01 EDT by Petr Sakař
Modified: 2014-06-28 11:42 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Attempting to set a value using the `jboss-cli` tool that contained a property would only save the character `$` in the value instead of the property unless the entire value was contained in double-quotes. This was because the CLI command line parser would incorrectly parse any `${X}` expression as only `$` unless it was contained in double-quotes. The command line parser has been fixed in this release, so that attributes with properties will be correctly parsed even if they are not contained in double-quotes.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-28 11:42:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-2051 Major Resolved CLI write attribute dialog for string value should enclose value in generated command to double quotes 2017-10-18 12:36 EDT

  None (edit)
Description Petr Sakař 2013-07-25 05:01:55 EDT
Description of problem:
String value entered in write attribute dialog is written to command without double quotes, which is wrong in many cases

Eg. when user enteres in dialog value ${jboss.bind.address:127.0.0.1}
following command is generated:

/subsystem=webservices/:write-attribute(name=wsdl-host,value=${jboss.bind.address:127.0.0.1})

Correctly should be generated command 
/subsystem=webservices/:write-attribute(name=wsdl-host,value="${jboss.bind.address:127.0.0.1}")

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


How reproducible:


Steps to Reproduce:
1. start AS
  ./bin/standalone.sh
2. start CLI GUI 
  ./bin/jboss-cli.sh --gui &
3. click on node subsystem=webservices of /
4. right click on wsdl-host and select write-attribute
5. enter value ${jboss.bind.address:127.0.0.1} and click OK
6. submit generated command
7. reload node
  click on node subsystem=webservices of / (close node)
  click on node subsystem=webservices of / (open node)

Actual results:
  wsdl-host=$

Expected results:
  wsdl-host=${jboss.bind.address:127.0.0.1}


Workaround
  in dialog box enclose the value in double quotes

Additional info:
Comment 2 Chao Wang 2013-09-12 06:11:14 EDT
Issue exists in wildfly as well, and also see this with normal CLI write-attribute operation for attributes like STRING type and expression-allowed => true, 
Example: /interface=management:write-attribute(name=inet-address,value=${jboss.bind.address.management:127.0.0.1})

From https://github.com/wildfly/wildfly/blob/master/cli/src/main/java/org/jboss/as/cli/ArgumentValueConverter.java?source=c#L71

toSet = ModelNode.fromString(value); This returns 'IllegalArgumentException: Invalid character: $' then '$' is set by ArgumentValueCallbackHandler

Create an upstream issue as well https://issues.jboss.org/browse/WFLY-2051
Comment 4 JBoss JIRA Server 2013-09-17 10:20:27 EDT
Alexey Loubyansky <alex@jboss.org> made a comment on jira WFLY-2051

It's actually a bug in the CLI command line parser. I.e. it parses any expression like ${xxxx} to simply $. This would fix it 
https://github.com/aloubyansky/wildfly/commit/255fa8e50a98cae9bffbe7dd60adc6d518548341
Comment 5 JBoss JIRA Server 2013-09-17 10:21:04 EDT
Alexey Loubyansky <alex@jboss.org> made a comment on jira WFLY-2051

It's actually a bug in the CLI command line parser. I.e. it parses any expression like ${xxxx} to simply $. This would fix it 
https://github.com/aloubyansky/wildfly/commit/255fa8e50a98cae9bffbe7dd60adc6d518548341
Comment 6 JBoss JIRA Server 2013-10-08 10:53:53 EDT
Alexey Loubyansky <alex@jboss.org> updated the status of jira WFLY-2051 to Resolved
Comment 7 JBoss JIRA Server 2013-10-08 10:53:53 EDT
Alexey Loubyansky <alex@jboss.org> made a comment on jira WFLY-2051

Fixed.
Comment 9 James Perkins 2014-03-05 12:35:53 EST
*** Bug 1054214 has been marked as a duplicate of this bug. ***
Comment 10 Petr Kremensky 2014-03-07 06:44:07 EST
Verified on EAP 6.2.0.DR2
Comment 11 Brian Stansberry 2014-05-05 16:19:24 EDT
*** Bug 1066228 has been marked as a duplicate of this bug. ***

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