1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-30 07:28:52 +00:00
community.general/changelogs/fragments
patchback[bot] 865c96e66c
[PR #11850/f8869af6 backport][stable-11] homebrew_cask: fix sudo_password failing with special characters (#11866)
* homebrew_cask: fix sudo_password failing with special characters (#11850)

* homebrew_cask: fix sudo_password with special characters in password

The SUDO_ASKPASS script embedded the password inside single quotes, which
breaks shell parsing whenever the password contains a single quote. Use a
quoted heredoc (cat <<'SUDO_PASS') instead, which treats the content
completely literally regardless of special characters.

Also replace .file.close() with .flush() (correct semantics — flushes
the write buffer without leaving the NamedTemporaryFile in a half-closed
state) and remove the redundant add_cleanup_file() call (the context
manager already deletes the file on exit).

Fixes #4957

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* homebrew_cask: add changelog fragment for #11850

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* homebrew_cask: fix sudo_password example and clarify ansible_become_password

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* homebrew_cask: use shlex.quote() for sudo_password instead of heredoc

shlex.quote() is the standard Python approach for shell-safe quoting
and handles all special characters without the edge cases of heredocs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit f8869af65f)

* Make Python 2 compatible.

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2026-04-17 18:31:36 +02:00
..
.keep Rename changelogs/fragments/.empty -> changelogs/fragments/.keep 2020-08-07 08:17:57 +02:00
11.4.7.yml Prepare 11.4.7. 2026-04-08 20:14:29 +02:00
11754-mssql-script-params-substitution.yml [PR #11754/b780224d backport][stable-11] mssql_script: only pass params to cursor.execute() when provided (#11759) 2026-04-08 20:06:04 +02:00
11823-lvol-lvm-version-regex.yml [PR #11823/71723268 backport][stable-11] lvol: fix LVM version regex to handle date formats without dashes (#11830) 2026-04-15 22:01:44 +02:00
11836-fixes.yml [stable-11] Fix flatpak module for Fedora 44 (#11847) 2026-04-17 07:03:28 +02:00
11850-homebrew-cask-sudo-password.yml [PR #11850/f8869af6 backport][stable-11] homebrew_cask: fix sudo_password failing with special characters (#11866) 2026-04-17 18:31:36 +02:00