Project

General

Profile

Actions

Bug #10575

closed

putting a double quote in a technique in the "class" parameter generate an invalid rudder-reporting file for the agent

Added by Vincent MEMBRÉ almost 7 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Technique editor
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

When using a double quote " in the class parameter of a method call and having a condition on this method call, we generate a rudder-reporing file invalid for the agent (syntax error)

The quote is not escaped in the rudder-reporting file breaking a call to logger.

That double quote should be automatically escaped.

quick example:

  • Create a Technique with a "command execution" method.
  • as command put : /bin/echo "test" > /tmp/test
  • as condition add : linux

Save and it will generate a rudder-reporting file for Rudder which will be invalid

When applying it in Rudder, you will get a syntax error message:

Stderr: '/var/rudder/cfengine-community/inputs.new/test/1.0/rudder_reporting.cf:12:79: error: syntax error
"dummy_report" usebundle => log_rudder("Command execution /bin/echo "test" > /tmp/echo if any.linux", "command_execution__bin_echo__test_____tmp_echo", "${class_prefix}", @{args});
^
/var/rudder/cfengine-community/inputs.new/test/1.0/rudder_reporting.cf:12:79: error: Expected ',', wrong input 'test'
"dummy_report" usebundle => log_rudder("Command execution /bin/echo "test" > /tmp/echo if any.linux", "command_execution__bin_echo__test_____tmp_echo", "${class_prefix}", @{args});
^
/var/rudder/cfengine-community/inputs.new/test/1.0/rudder_reporting.cf:12:106: error: Invalid function argument, wrong input '" > /tmp/echo if any.linux"'
"dummy_report" usebundle => log_rudder("Command execution /bin/echo "test" > /tmp/echo if any.linux", "command_execution__bin_echo__test_____tmp_echo", "${class_prefix}", @{args});
^

Subtasks 2 (0 open2 closed)

Bug #10603: Broken testsReleasedAlexis MoussetActions
Bug #10604: Broken testsReleasedAlexis MoussetActions
Actions

Also available in: Atom PDF