diff --git a/.changelog/3d35583634994f17915c859ae0c1f0f4.json b/.changelog/3d35583634994f17915c859ae0c1f0f4.json new file mode 100644 index 00000000000..298dd8bf10e --- /dev/null +++ b/.changelog/3d35583634994f17915c859ae0c1f0f4.json @@ -0,0 +1,10 @@ +{ + "id": "3d355836-3499-4f17-915c-859ae0c1f0f4", + "type": "bugfix", + "description": "Remove invalid escaping of shared config values. All values in the shared config file will now be interpreted literally, save for fully-quoted strings which are unwrapped for legacy reasons.", + "modules": [ + ".", + "config", + "internal/ini" + ] +} \ No newline at end of file diff --git a/internal/ini/strings.go b/internal/ini/strings.go index 661588c2276..ed77d083517 100644 --- a/internal/ini/strings.go +++ b/internal/ini/strings.go @@ -67,12 +67,8 @@ func unquote(s string) string { // applies various legacy conversions to property values: // - remote wrapping single/doublequotes -// - expand escaped quote and newline sequences func legacyStrconv(s string) string { s = unquote(s) - s = strings.ReplaceAll(s, `\"`, `"`) - s = strings.ReplaceAll(s, `\'`, `'`) - s = strings.ReplaceAll(s, `\n`, "\n") return s } diff --git a/internal/ini/testdata/valid/escaped_profile b/internal/ini/testdata/valid/escaped_profile deleted file mode 100644 index b3df9972171..00000000000 --- a/internal/ini/testdata/valid/escaped_profile +++ /dev/null @@ -1,3 +0,0 @@ -[ default ] -foo = "\"bar\"" -baz = "qux\n" diff --git a/internal/ini/testdata/valid/escaped_profile_expected b/internal/ini/testdata/valid/escaped_profile_expected deleted file mode 100644 index 914d6860198..00000000000 --- a/internal/ini/testdata/valid/escaped_profile_expected +++ /dev/null @@ -1,6 +0,0 @@ -{ - "default": { - "foo": "\"bar\"", - "baz": "qux\n" - } -}