Project

General

Profile

Actions

Bug #9759

closed

When a variable contains line breaks, the agent (sometimes?) produces invalid JSON

Added by Alexis Mousset over 7 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Agent
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
43
Name check:
Fix check:
Regression:

Description

Line breaks are not escaped, for example:

     "node": {
       "env[MANPATH
 PWD
 PATH]": "",
Actions #1

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.17 to 3.1.18
Actions #2

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.18 to 3.1.19
Actions #3

Updated by Benoît PECCATTE about 7 years ago

  • Priority set to 0

Alexis you need to elaborate a bit on this.
Where does this happen, what are the consequences ?

Actions #4

Updated by Alexis Mousset about 7 years ago

It happens when writing json from the agent (into a file or string), and leads to invalid json content.

It may only happen in some cases, here it was with a variable defined from a command output in CFEngine 3.6.5.

Actions #5

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #6

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.20 to 3.1.21
Actions #7

Updated by Benoît PECCATTE about 7 years ago

Alexis, when does the agent produce a JSON ? And what is its content ?

What reads this JSON (and fails) ?

Actions #8

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 3.1.21 to 3.1.22
Actions #9

Updated by Benoît PECCATTE almost 7 years ago

Alexis, any news ?

Actions #10

Updated by Alexis Mousset almost 7 years ago

It's very likely about jinja templating.

Actions #11

Updated by Benoît PECCATTE almost 7 years ago

  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority changed from 0 to 33
Actions #12

Updated by Benoît PECCATTE almost 7 years ago

  • Priority changed from 33 to 47
Actions #13

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 3.1.22 to 3.1.23
  • Priority changed from 47 to 46
Actions #14

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 3.1.23 to 3.1.24
  • Priority changed from 46 to 45
Actions #15

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 3.1.24 to 3.1.25
  • Priority changed from 45 to 44
Actions #16

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 3.1.25 to 387
  • Priority changed from 44 to 43
Actions #17

Updated by Alexis Mousset over 6 years ago

  • Status changed from New to Rejected

Fixed in CFEngine 3.10, closing.

Actions #18

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 387 to 3.1.25
Actions

Also available in: Atom PDF