community.general/lib/ansible
Adrian Likins edcbef27ec Retain vault password as bytes in 2.2 (#22378)
* Retain vault password as bytes in 2.2

Prior to 2.2.1, the vault password was read in as byes and then remained
bytes all the way through the code.  A bug existed where bytes and text
were mixed, leading to a traceback with non-ascii passwords.  In devel,
this was fixed by changing the read in password to text type to match
with our overall strategy of converting at the borders.  This was
backported to stable-2.2 for the 2.2.1 release.

On reflection, this should not have been backported as it causes
passwords which were originally non-utf-8 to become utf-8.  People will
then have their working 2.2.x vault files become in-accessible.

this commit pipes bytes all the way through the system for vault
password.  That way if a password is read in as a non-utf-8 character
sequence, it will continue to work in 2.2.2+.  This change is only for
the 2.2 branch, not for 2.3 and beyond.

Why not everywhere?  The reason is that non-utf-8 passwords will cause
problems when vault files are shared between systems or users.  If the
password is read from the prompt and one user/machine has a latin1
encoded locale while a second one has utf-8, the non-ascii password
typed in won't match between machines.  Deal with this by making sure
that when we encrypt the data, we always use valid utf-8.

Fixes #20398

(cherry picked from commit 5dcce0666a81917c68b76286685642fd72d84327)
2017-03-07 15:30:09 -05:00
..
cli Retain vault password as bytes in 2.2 (#22378) 2017-03-07 15:30:09 -05:00
compat Fix typo when choosing KqueueSelector 2017-02-06 08:46:58 -08:00
config Making the switch to v2 2015-05-03 21:47:26 -05:00
errors adds feature to all modules to be run locally (#18763) 2016-12-15 15:47:29 -05:00
executor Change warning message as advised by bcoca 2017-02-27 09:41:41 -08:00
galaxy Add role skeleton support (#17079) 2017-03-01 20:23:18 -05:00
inventory fix 'ungrouped' issue with some inventory formats 2017-03-07 12:49:24 -05:00
module_utils Idempotency fix for iosxr_config (#22365) 2017-03-07 15:57:19 +00:00
modules ec2_group: description is only required when group state is present (#19791) 2017-03-07 20:55:17 +01:00
parsing Retain vault password as bytes in 2.2 (#22378) 2017-03-07 15:30:09 -05:00
playbook Verify that the role specification is using a comma before warning 2017-03-07 09:35:42 -05:00
plugins Extend SSH Retry to put_file and fetch_file (#20187) 2017-03-02 16:56:29 -06:00
template Also clean template data even if marked unsafe 2017-02-10 10:08:55 -06:00
utils Bad extra early (#22322) 2017-03-07 13:44:36 -05:00
vars Fix variable precedence of INI/script vars to be in-line with docs. 2017-03-02 17:07:00 -06:00
__init__.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
constants.py Add role skeleton support (#17079) 2017-03-01 20:23:18 -05:00
release.py Bumping devel version to 2.3.0 2016-10-03 11:46:31 -05:00