Open petrbroz opened 2 years ago
I'm wondering if this could be addressed by supporting an --encoded
flag in the same way as it can be used with config:set
(basically base64 encoding all config values returned from config:export
independently from what --format
is used)?
Description of problem
The JSON response from dokku-daemon is invalid in certain situations, for example, when config variables contain "bad" characters such as double-quotes or backslashes.
Btw. I think this sometimes happens in other types of commands as well, for example, when the response from the
logs
command contains "bad" characters, the JSON response from dokku-daemon also cannot be parsed.Steps to Reproduce
dokku apps:create dummy-app
dokku config:set dummy-app FOO="bar\"baz"
socat
config:export dummy-app --format json
Actual Results
{"ok":true,"output":"{\"FOO\":\"bar\\"baz\"}"}
(this JSON doesn't seem to be valid)Expected Results
Probably
{"ok":true,"output":"{\"FOO\":\"bar\\\"baz\"}"}
.Environment Information
dokku report dummy-app
outputHow (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?
Installed to an AWS EC2 instance.