mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Fix exception in xattr module when existing extended attribute's value contains non-printable characters and the base64-encoded string contains a '=' sign
* Added changelog fragment for #3675
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2f0ae0408d
)
Co-authored-by: sc-anssi <sc-anssi@users.noreply.github.com>
This commit is contained in:
parent
847f8b9e21
commit
43269c9255
2 changed files with 4 additions and 1 deletions
3
changelogs/fragments/3675-xattr-handle-base64-values.yml
Normal file
3
changelogs/fragments/3675-xattr-handle-base64-values.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
bugfixes:
|
||||
- xattr - fix exception caused by ``_run_xattr()`` raising a ``ValueError``
|
||||
due to a mishandling of base64-encoded value (https://github.com/ansible-collections/community.general/issues/3673).
|
|
@ -157,7 +157,7 @@ def _run_xattr(module, cmd, check_rc=True):
|
|||
if line.startswith('#') or line == '':
|
||||
pass
|
||||
elif '=' in line:
|
||||
(key, val) = line.split('=')
|
||||
(key, val) = line.split('=', 1)
|
||||
result[key] = val.strip('"')
|
||||
else:
|
||||
result[line] = ''
|
||||
|
|
Loading…
Reference in a new issue