mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 18:43:26 +01:00
CLOUDSTACK-2450: Fix userdata to be urlencoded safely
urlencoding the userdata and quoting the = since apiserver will strip them out. This will send an invalid userdata down to the plugin (vmops) where base64 decoding fails causing vm deployment to fail. Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
32c8cd3cd7
commit
4be18aefc4
@ -376,7 +376,7 @@ class VirtualMachine:
|
|||||||
cmd.hostid = hostid
|
cmd.hostid = hostid
|
||||||
|
|
||||||
if "userdata" in services:
|
if "userdata" in services:
|
||||||
cmd.userdata = base64.b64encode(services["userdata"])
|
cmd.userdata = base64.urlsafe_b64encode(services["userdata"])
|
||||||
|
|
||||||
if group:
|
if group:
|
||||||
cmd.group = group
|
cmd.group = group
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user