Preserve original collect password to be used for subcloud collect
Collecting from a subcloud using a user account with a password
containing special characters such as $, [, ], /, or " will fail
due to an "Invalid Password" error.
When the collect command is initially invoked by the user, the first
escape character(s) are added to prefix the special character(s)
in the password. Subcloud collects initiate a second call to collect
which leads to a double special character escape which corrupts the
password.
This update resolves this issue by preserving the original unescaped
password so it can be passed to the subcloud collect. Doing so avoids
the double password escape.
Test Plan:
PASS: Verify subcloud collect without special sudo password characters
PASS: Verify subcloud collect with special sudo password characters
PASS: Verify host collect without special sudo password characters
PASS: Verify host collect with special sudo password characters
Closes-Bug: 2072394
Change-Id: If7cf684b6412687c89e5af36b5b2e9b6e2a832f9
Signed-off-by: Eric MacDonald <email address hidden>
Reviewed: https:/ /review. opendev. org/c/starlingx /utilities/ +/923912 /opendev. org/starlingx/ utilities/ commit/ 0b6055487e9bd67 eff288f25f44e94 f977740830
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 0b6055487e9bd67 eff288f25f44e94 f977740830
Author: Eric MacDonald <email address hidden>
Date: Thu Jul 11 01:13:19 2024 +0000
Preserve original collect password to be used for subcloud collect
Collecting from a subcloud using a user account with a password
containing special characters such as $, [, ], /, or " will fail
due to an "Invalid Password" error.
When the collect command is initially invoked by the user, the first
escape character(s) are added to prefix the special character(s)
in the password. Subcloud collects initiate a second call to collect
which leads to a double special character escape which corrupts the
password.
This update resolves this issue by preserving the original unescaped
password so it can be passed to the subcloud collect. Doing so avoids
the double password escape.
Test Plan:
PASS: Verify subcloud collect without special sudo password characters
PASS: Verify subcloud collect with special sudo password characters
PASS: Verify host collect without special sudo password characters
PASS: Verify host collect with special sudo password characters
Closes-Bug: 2072394 7c89e5af36b5b2e 9b6e2a832f9
Change-Id: If7cf684b641268
Signed-off-by: Eric MacDonald <email address hidden>