summaryrefslogtreecommitdiffstats
path: root/database/rrdlabels.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
commit6cf8f2d5174a53f582e61d715edbb88d6e3367cc (patch)
tree78cec0fd8d09c4a6a052461d42f4b2be3af6d396 /database/rrdlabels.c
parentAdding upstream version 1.39.1. (diff)
downloadnetdata-upstream/1.40.0.tar.xz
netdata-upstream/1.40.0.zip
Adding upstream version 1.40.0.upstream/1.40.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--database/rrdlabels.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/database/rrdlabels.c b/database/rrdlabels.c
index f6abd6023..051222109 100644
--- a/database/rrdlabels.c
+++ b/database/rrdlabels.c
@@ -153,9 +153,9 @@ static unsigned char label_values_char_map[256] = {
[88] = 'X', // X keep
[89] = 'Y', // Y keep
[90] = 'Z', // Z keep
- [91] = '_', // [
+ [91] = '[', // [ keep
[92] = '/', // backslash convert \ to /
- [93] = '_', // ]
+ [93] = ']', // ] keep
[94] = '_', // ^
[95] = '_', // _ keep
[96] = '_', // `
@@ -1223,6 +1223,7 @@ int rrdlabels_unittest_sanitization() {
errors += rrdlabels_unittest_sanitize_value("", "[none]");
errors += rrdlabels_unittest_sanitize_value("1", "1");
errors += rrdlabels_unittest_sanitize_value(" hello world ", "hello world");
+ errors += rrdlabels_unittest_sanitize_value("[none]", "[none]");
// 2-byte UTF-8
errors += rrdlabels_unittest_sanitize_value(" Ελλάδα ", "Ελλάδα");