Enclose credentials with quotes to escape special characters
Currently, if the admin password contains certain special
characters such as "&", this causes failure on the upgrade
process during data migration. This happens because the upgrade
manifest tries to run a command passing the password as argument
on the CLI and the "&" is interpreted as "run in background" by
the shell instead of as part of the password argument.
This commit encloses the password argument in the failing command
with single quotes, so that special characters are interpreted as
part of the argument string instead of the special effects they
assume on the shell, also single quotes avoid possible variable
expansion when using "$".
Test Plan
PASS: verify that data migration phase completes successfully
with admin password containing "&", "<", ">", "|" and "$"
Closes-bug: 1964478
Change-Id: Id486490e46ab0021f8cad69c9015e74e3e0ff7ee
Signed-off-by: Heitor Matsui <HeitorVieira.Matsui@windriver.com>
This commit is contained in:
@@ -186,7 +186,7 @@ def get_upgrade_token(from_release,
|
||||
keystone_upgrade_token = (
|
||||
"openstack "
|
||||
"--os-username {} "
|
||||
"--os-password {} "
|
||||
"--os-password '{}' "
|
||||
"--os-auth-url {} "
|
||||
"--os-project-name admin "
|
||||
"--os-user-domain-name {} "
|
||||
|
||||
Reference in New Issue
Block a user