DagSonsteboSB opened a new issue #3202: Userdata incorrectly encoded URL: https://github.com/apache/cloudstack/issues/3202 ##### ISSUE TYPE * Bug Report ##### COMPONENT NAME * Userdata input in CloudStack 4.11 ##### CLOUDSTACK VERSION * ACS 4.11.2 ##### CONFIGURATION * N/A ##### OS / ENVIRONMENT * Tested on CentOS7 but is version agnostic. ##### SUMMARY * Userdata is incorrectly URLencoded *before* base64 encoding ##### STEPS TO REPRODUCE * Create new VM and pass the following userdata string: cat ${hostname}-local >>/etc/hostname * Check the string passed through API call and landing in database: > SELECT * FROM cloud.user_vm where id=8 | id | iso_id | display_name | user_data | update_parameters | | 8 | | d1ct | Y2F0ICR7aG9zdG5hbWV9LWxvY2FsICZndDsmZ3Q7L2V0Yy9ob3N0bmFtZQ== | 1 | * Decode this string and note greater than symbols converted to >: # echo Y2F0ICR7aG9zdG5hbWV9LWxvY2FsICZndDsmZ3Q7L2V0Yy9ob3N0bmFtZQ== | base64 -d cat ${hostname}-local >>/etc/hostname * For completeness sake also do a curl from the guest VM and confirm the same wrongly converted string is passed back from the VR ##### EXPECTED RESULTS * Expected output to be same as input: cat ${hostname}-local >>/etc/hostname ##### ACTUAL RESULTS * Actual output was URLencoded: cat ${hostname}-local >>/etc/hostname ~~~
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services