Bug #23027
closedVirt-who password encryption fails when the password has $ (Special Character).
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1559583
Description of problem:
Virt-who password encryption fails when the password has $ in it. Even it fails when you put in ( " " ) as well.
Version-Release number of selected component (if applicable):
Satellite-6.3.0-23.0.el7sat.noarch
satellite-6.2.13-4.0.el7sat.noarch
virt-who-0.19-8.el7_4.noarch
How reproducible:
Fire the following command:
step 1:
~~~~~~~~~~~~~
#virt-who-password --password="password"
~~~~~~~~~~~~~
Step 2:
~~~~~~~~~~~~
#virt-who-password
#password
~~~~~~~~~~~~
Step 3:
~~~~~~~~~~~~
#virt-who-password --password="pass$word"
~~~~~~~~~~~~
Step 4:
~~~~~~~~~~~~~
#virt-who-password
#password
~~~~~~~~~~~~~
Actual results:
[root@localhost ~]# virt-who-password --password="red@hat"
Use following as value for encrypted_password key in the configuration file:
ca5fab1562e2f1a2192c25d34a85a0b2
[root@localhost ~]# virt-who-password
Password: =========>>> Password was = red@hat
Use following as value for encrypted_password key in the configuration file:
ca5fab1562e2f1a2192c25d34a85a0b2
[root@localhost ~]# virt-who-password --password="red$hat"
Use following as value for encrypted_password key in the configuration file:
6e7c223bd7a65c12eeb64d32be5dfe51
[root@localhost ~]# virt-who-password
Password: ============>>>> Password was red$hat
Use following as value for encrypted_password key in the configuration file:
d9929330a8210748f1505b31b9629079
Expected results:
[root@localhost ~]# virt-who-password --password="red$hat"
Use following as value for encrypted_password key in the configuration file:
6e7c223bd7a65c12eeb64d32be5dfe51
[root@localhost ~]# virt-who-password
Password: ============>>>> Password was red$hat
Use following as value for encrypted_password key in the configuration file:
6e7c223bd7a65c12eeb64d32be5dfe51
Additional info: