Actions
Bug #10575
closedputting a double quote in a technique in the "class" parameter generate an invalid rudder-reporting file for the agent
Status:
Released
Priority:
N/A
Assignee:
Category:
Web - Technique editor
Target version:
Pull Request:
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}); ^
Updated by Vincent MEMBRÉ over 7 years ago
- Category set to Technique editor - API
- Assignee set to Vincent MEMBRÉ
- Target version set to 0.x
Updated by Vincent MEMBRÉ over 7 years ago
- Status changed from New to In progress
Updated by Vincent MEMBRÉ over 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Alexis Mousset
- Pull Request set to https://github.com/Normation/ncf/pull/569
Updated by Vincent MEMBRÉ over 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset 384c6e64227bed613a1ded1f87d85429762085ec.
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from Pending release to Released
Updated by Alexis Mousset over 2 years ago
- Target version changed from 0.x to ncf-0.x
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category changed from Technique editor - API to Web - Technique editor
Actions