Project

General

Profile

Actions

Bug #17674

closed

Global parameter "string" doesn't escape json

Added by François ARMAND over 4 years ago. Updated over 4 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Compliance & node report
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

Description

If you chose "string" for a global parameter and the value is json, it is not correctly escaped.

It does not seems blocking (just grave) since you can still print the json string, or add double quote to get a formatted json - but in that case, you also get the quote printed.

So, tu sum up, this is whant you get, and what we would like to have (in file enforce content):

global parameter name global parameter value in ldap type in param type in node in file enforce content directive printed in file comment
p1 {
"foo":"bar"
}
{"foo":"bar"} string json ${node.properties[p1] {"foo":"bar"} same as if the type was string but formating is lost, override will work like for json
p2 {"foo":"bar"} {"foo":"bar"} json json ${node.properties[p2] {"foo":"bar"} as expected
p3 "{
"foo":"bar"
}"
"\{\"foo\":\"bar\"\}" string string ${node.properties[p3] "{
"foo":"bar"
}"
as expected. Formatting kept, but " remains

Subtasks 1 (0 open1 closed)

Bug #17682: Make clear in parent that parsing code is commonReleasedVincent MEMBRÉActions
Actions #1

Updated by François ARMAND over 4 years ago

  • Description updated (diff)
Actions #2

Updated by François ARMAND over 4 years ago

  • Status changed from New to In progress
Actions #3

Updated by François ARMAND over 4 years ago

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

Updated by François ARMAND over 4 years ago

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

Updated by Vincent MEMBRÉ over 4 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.1.0~rc4 which was released today.

Actions

Also available in: Atom PDF