om icon indicating copy to clipboard operation
om copied to clipboard

OM cli fails if --vsphere-password contains a slash

Open ryanmichaelsmith opened this issue 3 years ago • 4 comments

If vSphere password contains a slash, OM cli fails to parse the URL that it generates. I've not found a workaround other than changing the password.

$ om -t https://opsman.domain.com -u admin -p om_password --skip-ssl-validation vm-lifecycle export-opsman-config --config-file=pae_config/opsman.yml --state-file=pae_config/state.yml --vsphere-username="Pivotal_vSphere_SVC" --vsphere-password="test/password" --vsphere-url=https://vsphere.domain.com
2022/01/07 15:18:47 could not parse url: parse "https://Pivotal_vSphere_SVC:test/[email protected]/sdk": invalid port ":test" after host

ryanmichaelsmith avatar Jan 07 '22 15:01 ryanmichaelsmith

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Jan 07 '22 15:01 cf-gitbot

This seems related to the way OM builds the request for vSphere, further investigation may be needed to device an issue but for now, the workaround would be to change the password to not use / or other special characters.

jaristiz avatar Jan 07 '22 18:01 jaristiz

I've created #578 with preliminary changes to support this kind of special character on vSphere, waiting for someone to review.

jaristiz avatar Jan 11 '22 20:01 jaristiz

I wonder if the vSphere username shouldn't also be escaped

sneal avatar Oct 11 '22 21:10 sneal