-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
vault 1.14.x kv2 UI "download" replaces newlines with \n
#22279
Comments
\n
\n
AFAICT from trying to follow the ui/js/? logic, it starts with masked-input.hbs I could see doing some string transformation if we were downloading the entire secret with multiple values and needed a JSON object to properly represent the secret (multiple values or even a k/v pair) as a hash. In the case of the "download" button in question here, the user is only ever asking/expecting/getting the single value. It's not clear why we want to force a transformation rather than returning the value into the file that gets downloaded as-is. [1] vault/ui/lib/core/addon/components/masked-input.hbs Lines 49 to 57 in d3d5e0e
[2] vault/ui/lib/core/addon/components/download-button.js Lines 57 to 62 in 5e5ead4
[3] vault/ui/app/helpers/stringify.js Lines 8 to 12 in d3d5e0e
|
Describe the bug
KV secrets has a neat feature in the web ui introduced in 1.14.x where you can download a secret. When the secret contains newlines (ie a .ovpn file), it displays correctly when shown/previewed in the UI. However the "download" function for this secret replaces the newlines in the generated file with the string literal
\n
To Reproduce
Steps to reproduce the behavior:
\n
insteadExpected behavior
The downloaded/generated file should maintain the newlines of the original.
Environment:
vault status
): 1.14.1The text was updated successfully, but these errors were encountered: