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

Values need to be XML encoded before being sent to oVirt's API #230

Open
hotspoons opened this issue Jul 12, 2022 · 0 comments
Open

Values need to be XML encoded before being sent to oVirt's API #230

hotspoons opened this issue Jul 12, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@hotspoons
Copy link

Describe the bug

A downstream project (oVirt Terraform provider) uses this library / application to handle communications with the oVirt API. Today when trying to get it to function with a custom initialization script, I struggled for several hours trying to figure out why I couldn't get a VM to properly execute an initialization script.

The biggest issue I ran into was that this library does not XML entity encode values provided to the oVirt API, so if there is a reserved XML token in something like a shell command, it fails the entire request.

To Reproduce

provide the value

runcmd: 
  - echo "blah" > /tmp/blah.txt && sleep 1

to the customScript property, I guarantee it will break the request. I don't know how to do that directly here, but I left some terraform/hcl in a documentation request in the other project here

Expected behavior

Any arbitrary value passed in the customScript property should not break the request, the value should be properly encoded/escaped.

@hotspoons hotspoons added the bug Something isn't working label Jul 12, 2022
@hotspoons hotspoons assigned ghost Jul 12, 2022
@ghost ghost removed their assignment Apr 24, 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
Projects
None yet
Development

No branches or pull requests

1 participant