Project

General

Profile

Bug #12390

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

Added by Félix DALLIDET 8 months ago. Updated 8 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

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

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

Related issues

Related to Rudder - Bug #12674: Policies regeneration error when using a parameters with " charReleased

Associated revisions

Revision 6097ea2b (diff)
Added by François ARMAND 8 months ago

Fixes #12390: Doubled \"\\" in GM call

History

#1 Updated by Félix DALLIDET 8 months 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"  )
    ....

#2 Updated by François ARMAND 8 months ago

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

#3 Updated by François ARMAND 8 months 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

#4 Updated by François ARMAND 8 months 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.

#5 Updated by François ARMAND 8 months ago

  • Project changed from Windows DSC (old, do not use, need to migrate issues to other project) 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 4.2-1.5 to 4.2.5

#7 Updated by Normation Quality Assistant 8 months ago

  • Assignee changed from Nicolas CHARLES to François ARMAND

#8 Updated by François ARMAND 8 months ago

  • Status changed from Pending technical review to Pending release

#9 Updated by Alexis MOUSSET 8 months 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.

#10 Updated by François ARMAND 8 months 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)

#11 Updated by Nicolas CHARLES 7 months ago

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

Also available in: Atom PDF