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 #1

Updated by Nicolas CHARLES about 7 years ago

  • Project changed from 41 to Rudder
  • Category set to Agent
Actions #2

Updated by Nicolas CHARLES about 7 years ago

prefixing the sectionName by set_variable_values_ini.sectionName is also a valid workaround

Actions #3

Updated by Benoît PECCATTE about 7 years ago

  • 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

Actions #4

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 4.1.9 to 4.1.10
Actions #5

Updated by Alexis Mousset almost 7 years ago

  • Status changed from New to In progress
Actions #6

Updated by Alexis Mousset almost 7 years ago

  • Status changed from In progress to New
  • Target version changed from 4.1.10 to 4.3.0~beta1
Actions #7

Updated by Alexis Mousset almost 7 years ago

  • Status changed from New to In progress
Actions #8

Updated by Alexis Mousset almost 7 years ago

  • 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
Actions #9

Updated by Alexis Mousset almost 7 years ago

We need to match for compatibility with agent that do not have the (still unfinished) fix.

Actions #10

Updated by Alexis Mousset almost 7 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset ncf:commit:a3abf859a553499b058510583675a22c58387301.

Actions #11

Updated by Vincent MEMBRÉ almost 7 years ago

  • Parent task deleted (#11792)
  • Priority changed from 70 to 68
Actions #12

Updated by Vincent MEMBRÉ almost 7 years ago

  • Related to Bug #11792: Generic method file_ensure_key_value_present_in_ini_section.cf has leaky classes, resulting in invalid results added
Actions #13

Updated by Vincent MEMBRÉ almost 7 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.3.0~beta1 which was released today.

Actions

Also available in: Atom PDF