Project

General

Profile

Actions

Bug #11795

closed

Escaping variable in a method call fails

Added by Nicolas CHARLES about 7 years ago. Updated almost 7 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
68
Name check:
Fix check:
Regression:

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


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #11792: Generic method file_ensure_key_value_present_in_ini_section.cf has leaky classes, resulting in invalid resultsReleasedAlexis MoussetActions
Actions

Also available in: Atom PDF