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 over 6 years ago.
Updated over 6 years ago.
Category:
Web - Config management
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.
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" )
....
- Status changed from New to In progress
- Assignee set to François ARMAND
- 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
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.
- 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
- Assignee changed from Nicolas CHARLES to François ARMAND
- Status changed from Pending technical review to Pending release
- 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.
- 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)
- Related to Bug #12674: Policies regeneration error when using a parameters with " char added
Also available in: Atom
PDF