escape username

This commit is contained in:
Megan Marsh 2018-11-06 11:30:45 -08:00
parent 8567be43d9
commit 790d5661c5
1 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,8 @@ type StepExport struct {
func (s *StepExport) generateArgs(c *DriverConfig, displayName string, hidePassword bool) []string {
password := url.QueryEscape(c.RemotePassword)
username := url.QueryEscape(c.RemoteUser)
if hidePassword {
password = "****"
}
@ -36,7 +38,7 @@ func (s *StepExport) generateArgs(c *DriverConfig, displayName string, hidePassw
"--skipManifestCheck",
"-tt=" + s.Format,
"vi://" + c.RemoteUser + ":" + password + "@" + c.RemoteHost + "/" + displayName,
"vi://" + username + ":" + password + "@" + c.RemoteHost + "/" + displayName,
s.OutputDir,
}
return append(s.OVFToolOptions, args...)