Inline scripts token expansion broken in 2.6.9. How to escape the @ character? #2021

kureus opened this Issue Aug 22, 2016 · 8 comments


None yet

3 participants

kureus commented Aug 22, 2016

Upgraded to latest release and some of my scripts broke where I have an @ character in use.
So for example uploading a file using curl needs an @ to indicate its a file, e.g.

curl -F file=@/path/To/File http://somedomain/?filename=@option.filename@

In 2.6.6 this worked and the option.filename token was expanded properly. In 2.6.9 RD seems to pick up the first @ and expand from there.
Was there a major change to how token expansion works?
Do I now need too escape the first @ to get this working again or is this a bug?

Orginally posted this in the google group and was asked to create an issue here!msg/rundeck-discuss/JNC8aP-c1kU/UXHNR_dxAgAJ

@gschueler gschueler added the bug label Aug 22, 2016
@gschueler gschueler added this to the 2.6.x milestone Aug 22, 2016

I'm unable to reproduce this. Can you post your job definition (xml) with the error?

kureus commented Sep 19, 2016 edited

Simple test case to reproduce the issue I was talking about.

      <options preserveOrder='true'>
        <option name='domain' value='' />
    <name>Token expansion test</name>
    <sequence keepgoing='false' strategy='node-first'>
        <script><![CDATA[echo 'hello@@option.domain@']]></script>
        <scriptargs />

I would expect this to write out but instead it writes out hellooption.domain@
Ran on Rundeck 2.6.9-1 cafe bonbon indigo tower 2016-08-03


thanks for the test case

kureus commented Oct 27, 2016

@gschueler Any further news on this?

@gschueler gschueler self-assigned this Nov 2, 2016
@gschueler gschueler closed this in 4b7fd4f Nov 2, 2016
@gschueler gschueler removed the in progress label Nov 2, 2016
kureus commented Nov 2, 2016

Fantastic @gschueler. Many thanks

schast commented Nov 18, 2016


have big problems with this change.
i have inline script perl code with functions like this:

sub perlFunction {
    return \@files;

the script would now be generated without the backslash:

sub perlFunction {
    return @files;

i have tried to escape with:

rundeck inline script: \\@files
generated file: \\@files;

rundeck inline script: \\\@files
generated file: \\@files;

Please reopen this Ticket.


@schast i will open a new ticket. would you prefer a way to disable it completely?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment