-
Notifications
You must be signed in to change notification settings - Fork 154
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
OVFTool password escaping space character #110
Comments
I'm OK with either solution, but it must work cross-platform. Please make sure your solution works with Linux, Windows and Mac. You'll notice that Windows requires a temporary batch file. I remember having a lot of trouble properly handling quotes and escaping on Windows. terraform-provider-esxi/esxi/guest-create.go Lines 245 to 280 in 4ae1327
If your solution can remove the requirement of the temp batch file, that would be a great fix! Thanks. |
The
url.QueryEscape
parameter is used to escape the password provided to OVFTool in the locator string:terraform-provider-esxi/esxi/resource_guest.go
Line 278 in 430848e
terraform-provider-esxi/esxi/guest-create.go
Line 220 in 4ae1327
Unfortunately, the
url.QueryEscape
function escapes spaces as+
, which OVFTool treats as a literal+
. Consequently, providing a password containing spaces characters will cause authentication failure.I just hit this issue, and I would be happy to submit a pull request to perform the additional escape of space manually.
I would personally rather modify the provider to pass credentials to OVFTool via stdin. This would avoid the need for escaping altogether, and would also be better practice in terms of security. If you are willing to go this way then I'll submit a pull request.
The text was updated successfully, but these errors were encountered: