Project

General

Profile

Actions

Bug #12390

closed

(breaking change) In Windows Agent, a '\' in a directive parameter value is escaped but it should not

Added by Félix DALLIDET almost 6 years ago. Updated almost 6 years ago.

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

Description

INFO: the correction of that bug triggered a breaking change in plugin API. That means that a plugin must be compiled for Rudder 4.2.5 (or higher) to work with Rudder 4.2.5 (or higher).
A plugin compiled for 4.2.0 will only be compatible with Rudder 4.2.0 to 4.2.4.

The following plugin are only compatible with 4.2.0 to 4.2.4:

- dsc: 4.2-1.0 to 4.2-1.5
- datasources: 4.2-1.1
- node-external-resources: 4.2-1.3
- aix: 4.2-1.0

Problem was:

I tried to apply a registry directive and every "\" was doubled.
This breaks all registries path given.


Subtasks 1 (0 open1 closed)

Bug #12424: Fix test on boolean variableReleasedFrançois ARMANDActions

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #12674: Policies regeneration error when using a parameters with " charReleasedFrançois ARMANDActions
Actions #1

Updated by Félix DALLIDET almost 6 years ago

I expected this call in "registry_edition.ps1" :

function registry_edition {
  [CmdletBinding()]
  param (
      [parameter(Mandatory=$true)]  [string]$reportId,
      [parameter(Mandatory=$true)]  [string]$techniqueName,
      [switch]$auditOnly
  )

    $trackingkey = @(
        "e7bde10a-6c52-4d2e-a708-17d96bc675e6@@b1981ec4-a121-4ec7-92b0-10f785face97@@1"  )

    $paths = @(
        "HKEY_CURRENT_USER\Printers"  )

    $entries = @(
    ....

And end upo with :

function registry_edition {
  [CmdletBinding()]
  param (
      [parameter(Mandatory=$true)]  [string]$reportId,
      [parameter(Mandatory=$true)]  [string]$techniqueName,
      [switch]$auditOnly
  )

    $trackingkey = @(
        "e7bde10a-6c52-4d2e-a708-17d96bc675e6@@b1981ec4-a121-4ec7-92b0-10f785face97@@1"  )

    $paths = @(
        "HKEY_CURRENT_USER\\Printers"  )
    ....

Actions #2

Updated by François ARMAND almost 6 years ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #3

Updated by François ARMAND almost 6 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder/pull/1896
Actions #4

Updated by François ARMAND almost 6 years ago

So, the problem is in Rudder: there is one path for user setted values where we didn't set the escaping to be agent dependent.

The correction of that problem will be a breaking Agent Plugin API, meaning that any agent plugin (Windows DSC, AIX, etc) will need to be upgraded along with the version of Rudder introducing that change.

Actions #5

Updated by François ARMAND almost 6 years ago

  • Project changed from 52 to Rudder
  • Subject changed from Doubled "\" in GM call to In Windows Agent, a '\' in a directive parameter value is escaped but it should not
  • Category set to Web - Config management
  • Target version changed from 396 to 4.2.5
Actions #7

Updated by Rudder Quality Assistant almost 6 years ago

  • Assignee changed from Nicolas CHARLES to François ARMAND
Actions #8

Updated by François ARMAND almost 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #9

Updated by Alexis Mousset almost 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.2.5 and 4.3.0~rc3 which were released today.

Actions #10

Updated by François ARMAND almost 6 years ago

  • Subject changed from In Windows Agent, a '\' in a directive parameter value is escaped but it should not to (breaking change) In Windows Agent, a '\' in a directive parameter value is escaped but it should not
  • Description updated (diff)
Actions #11

Updated by Nicolas CHARLES almost 6 years ago

  • Related to Bug #12674: Policies regeneration error when using a parameters with " char added
Actions

Also available in: Atom PDF