#336 new
Charles Scott

parsing options and shell metacharacters

Reported by Charles Scott | June 10th, 2011 @ 10:54 AM

In order to prevent shell expansion, we typically single quote them. In rundeck, single quoting does not appear to be sufficient and additional escaping of single quoting is needed:

  <command>
    <exec>MyCommand -buildstamp ${option.buildstamp} -myresource \'${option.resourcename}\'  -mytype  \'[^\.]*\'</exec>
  </command>

Perhaps this is a bug where the parser removes such quoting?

Comments and changes to this ticket

  • Alex-SF

    Alex-SF July 9th, 2011 @ 01:46 PM

    • Tag set to options
  • Charles Scott

    Charles Scott October 12th, 2011 @ 04:32 PM

    Ran into this again.....

    I have the following shell invocation:

    this doesn't work:

     curl -L -k -f -o /tmp/ffffff.jar 'http://xcomm-nexus.local:8080/nexus/service/local/artifact/maven/content?r=snapshots&g=com.x.testapp&a=testapp&p=jar\&v=${option.version}'
    

    where this does:

    curl -L -k -f -o /tmp/ffffff.jar 'http://xcomm-nexus.local:8080/nexus/service/local/artifact/maven/content?r=snapshots\&g=com.x.testapp\&a=testapp\&p=jar\&v=${option.version}'
    

    Notice that when I single quote, it is not going to work

    I still have to escape the ampersand's

    where as in a normal shell, I do not have to do this.

  • Charles Scott

    Charles Scott October 12th, 2011 @ 04:34 PM

    stupid markup destroyed my example entirely

  • Greg Schueler

    Greg Schueler October 12th, 2011 @ 04:41 PM

    fixed formatting for you

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues

Shared Ticket Bins

People watching this ticket

Tags

Pages