Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove invalid escaping of shared config values #2461

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changelog/3d35583634994f17915c859ae0c1f0f4.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
4 changes: 0 additions & 4 deletions internal/ini/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 0 additions & 3 deletions internal/ini/testdata/valid/escaped_profile

This file was deleted.

6 changes: 0 additions & 6 deletions internal/ini/testdata/valid/escaped_profile_expected

This file was deleted.

Loading