Project

General

Profile

Actions

Bug #23551

closed

Broken handling of non-printable characters in techniques

Added by Alexis Mousset about 1 year ago. Updated about 1 year ago.

Status:
Released
Priority:
N/A
Category:
rudderc
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

Currently, when the input yml technique contains a escaped non-printable character like \b, it gets rendered into the output files, and in particular the generated metdata.xml is invalid (non-printable characters are forbidden in XML 1.0 and must be escaped in XML 1.1).

id: "test" 
name: "Test" 
version: "0.1" 
items:
  - method: command_execution
    params:
      command: "my command \b is here" 

The \b is interpreted as backspace char in output files.

We need to:

  • Check the behavior in 7.3
  • Prevent our XML output from including forbidden chars. Check with upstream quick_xml lib which should not accept it.
  • Implement a simple fix for RC 2
Actions #1

Updated by Alexis Mousset about 1 year ago

  • Description updated (diff)
Actions #2

Updated by Alexis Mousset about 1 year ago

  • Status changed from New to In progress
  • Assignee set to Alexis Mousset
Actions #3

Updated by Alexis Mousset about 1 year ago

In 7.3:

It is escaped a second time in the JSON:

        {
          "name":"command",
          "value":"toto\\btiti" 
        }
      <REPORTKEYS>
        <VALUE id="4f3a093c-3be0-4aef-9ff3-09ffcca58e72">toto\btiti</VALUE>
      </REPORTKEYS>
 iytfr_gm_0("Command execution", "toto\\btiti", "4f3a093c-3be0-4aef-9ff3-09ffcca58e72", "toto\\btiti")

The \b is kept in output files (and escaped once more in the .cf file).

Actions #4

Updated by Alexis Mousset about 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis Mousset to Félix DALLIDET
  • Pull Request set to https://github.com/Normation/rudder/pull/5092
Actions #5

Updated by Alexis Mousset about 1 year ago

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

Updated by Vincent MEMBRÉ about 1 year ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.0.0~rc2 which was released today.

Actions

Also available in: Atom PDF