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

Configuration might be unmarshal and altered before usage into templating #430

Open
rbeuque74 opened this issue Apr 14, 2023 · 0 comments
Open
Labels
bug Something isn't working enhancement New feature or request

Comments

@rbeuque74
Copy link
Member

Describe the bug
When using configuration in templating, if the value fetch from configstore is a raw value (such as a SSH key),
utask engine try to unmarshal it with yaml

err := yaml.Unmarshal([]byte(*v), &i, func(dec *json.Decoder) *json.Decoder {

In the case of a SSH key, the yaml.Unmarshal succeeds, but transform all \n into spaces.
The SSH key used in a utask template, given to the SSH plugin, is not usable.

Proposed fix
I guess we should add a new templating store, named configraw, and put the raw value there, without any yaml.Unmarshal.
In that way, if user want to use a raw value such as a SSH key, it can come from this store.

utask version impacted by the bug
All

cc @Alkorin

@rbeuque74 rbeuque74 added bug Something isn't working enhancement New feature or request labels Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant