Bug #11795
closed
Escaping variable in a method call fails
Added by Nicolas CHARLES about 7 years ago.
Updated almost 7 years ago.
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Getting started - demo | first install | level 1 Techniques
Description
Following code
# match a line starting like the key something
"$(index)\s*=.*"
edit_field => col("=","2","$($(tab)[$(sectionName)][$(index)])","set"),
select_region => INI_section(escape("$(sectionName)")),
classes => results("bundle", "set_variable_values_ini_not_$(cindex[$(index)])"),
ifvarclass => "edit_$(cindex[$(index)])";
fails to evaluate correctly the name of the section with our modified cfengine agent
With vanilla 3.10.2 agent, it works flawlessly
Workaround can be to use temporary var, but it's a huge job to rewrite everything, and other methods are also likely to fail
- Project changed from 41 to Rudder
- Category set to Agent
prefixing the sectionName by set_variable_values_ini.sectionName is also a valid workaround
- Severity set to Major - prevents use of part of Rudder | no simple workaround
- User visibility set to Getting started - demo | first install | level 1 Techniques
- Priority changed from 0 to 70
Because of the performance patch
- Target version changed from 4.1.9 to 4.1.10
- Status changed from New to In progress
- Status changed from In progress to New
- Target version changed from 4.1.10 to 4.3.0~beta1
- Status changed from New to In progress
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/ncf/pull/672
We need to match for compatibility with agent that do not have the (still unfinished) fix.
- Status changed from Pending technical review to Pending release
Applied in changeset ncf:commit:a3abf859a553499b058510583675a22c58387301.
- Parent task deleted (
#11792)
- Priority changed from 70 to 68
- Related to Bug #11792: Generic method file_ensure_key_value_present_in_ini_section.cf has leaky classes, resulting in invalid results added
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.3.0~beta1 which was released today.
Also available in: Atom
PDF