From 81261fe784af4d3016ad556bead535c37b74b18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Fri, 10 Mar 2023 13:54:04 +0100 Subject: [PATCH] Make sure to encode ascii control characters --- pkg/storage/utils/decomposedfs/metadata/ini_backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/utils/decomposedfs/metadata/ini_backend.go b/pkg/storage/utils/decomposedfs/metadata/ini_backend.go index e3ca9dcd7d6..3e3dbe022da 100644 --- a/pkg/storage/utils/decomposedfs/metadata/ini_backend.go +++ b/pkg/storage/utils/decomposedfs/metadata/ini_backend.go @@ -288,7 +288,7 @@ func needsEncoding(s []byte) bool { } for i := 0; i < len(s); i++ { - if s[i] > unicode.MaxASCII { + if s[i] < 32 || s[i] >= unicode.MaxASCII { // ASCII 127 = Del - we don't want that return true } }