Skip to content

Commit

Permalink
fix: remove invalid escaping of shared config values (#2461)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws authored Jan 22, 2024
1 parent c07adfa commit 4c897d4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
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.

0 comments on commit 4c897d4

Please sign in to comment.