mirror of
https://github.com/Oxalide/vsphere-influxdb-go.git
synced 2023-10-10 13:36:51 +02:00
Use url.UserPassword() so passwords are escaped (#101)
* add Dockerfile * dockerfile: switch to multi-stage build to lighten up the final image * dockerfile: update to latest images, and update the 2nd stage image on build * Use url.UserPassword() so passwords are escaped
This commit is contained in:
parent
88b072f48e
commit
dac91ccd2d
@ -110,7 +110,8 @@ func (vcenter *VCenter) Connect() error {
|
||||
defer cancel()
|
||||
|
||||
stdlog.Println("Connecting to vcenter:", vcenter.Hostname)
|
||||
u, err := url.Parse("https://" + vcenter.Username + ":" + vcenter.Password + "@" + vcenter.Hostname + "/sdk")
|
||||
u, err := url.Parse("https://" + vcenter.Hostname + "/sdk")
|
||||
u.User = url.UserPassword(vcenter.Username, vcenter.Password)
|
||||
if err != nil {
|
||||
errlog.Println("Could not parse vcenter url:", vcenter.Hostname)
|
||||
errlog.Println("Error:", err)
|
||||
|
Loading…
Reference in New Issue
Block a user