-
Notifications
You must be signed in to change notification settings - Fork 36
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
Ampersand in Datacentre name is not encoded correctly #120
Comments
@denislooby Thanks for submitting the issue. We'll try to reproduce it(should be easy) and fix it if it's possible! |
@denislooby Followup question. Which version of vCenter and CPI are you using? |
@medvedzver The CPI version was 45.1.0, vcentre/ESXi was 6.5.0 |
@denislooby Sorry for not responding for many days. |
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. |
This is fixed in v68 |
I have a datacentre called EP&T.
This is causing problems during vm creation when it tries to upload a file to the vm cloned from the stemcell.
It tries to upload to this URI.
https://w.x.y.z/folder/vm-1db04380-8ef3-4660-8d07-2be6d7caf86c/env.json?dcPath=EP&T&dsName=datastore1
The ampersand in EP&T is not encoded because the URI.escape used in file_provider.rb does not escape characters like & and =. As a result there is a 404 returned from vcenter.
CGI.escape does encode these characters.
Unfortunately unless I'm going crazy there seems to be a bug on the vcentre side as well!
If I browse into a VM folder on vcentre the url vcentre is using is
https://w.x.y.z/folder/vm-1db04380-8ef3-4660-8d07-2be6d7caf86c?dcPath=EP%2526T&dsName=datastore1
Note the '%2526' it should be just '%26', interesting to note that %25 is actually '%' so some odd double encoding issue in vcentre maybe?
So unfortunately while changing file_provider.rb will result in a correctly encoded URI, vcenter will still return 404 as it expects it's own incorrectly encoded version.
Probably still worth fixing in the CPI. But it looks like datacentres with & won't work until changes in both the CPI and vcentre.
The text was updated successfully, but these errors were encountered: