mitogen/ansible_mitogen
Alex Willmer b822f20007 ansible_mitogen: Handle AnsibleUnsafeText et al in Ansible >= 7
Follwing fixes in Ansible 7-9 for CVE-2023-5764 cating `AnsibleUnsafeBytes` &
`AnsibleUnsafeText` to `bytes()` or `str()` requires special handling. The
handling is Ansible specific, so it shouldn't go in the mitogen package but
rather the ansible_mitogen package.

`ansible_mitogen.utils.unsafe.cast()` is most like `mitogen.utils.cast()`.
During development it began as `ansible_mitogen.utils.unsafe.unwrap_var()`,
closer to an inverse of `ansible.utils.unsafe_procy.wrap_var()`. Future
enhancements may move in this direction.

refs #977, refs #1046

See also
- https://github.com/advisories/GHSA-7j69-qfc3-2fq9
- https://github.com/ansible/ansible/pull/82293
- https://github.com/mitogen-hq/mitogen/wiki/AnsibleUnsafe-notes
2024-04-04 09:11:23 +01:00
..
compat Remove vendored mitogen.compat.simplejson 2023-02-05 13:45:47 +00:00
plugins add SSH args into options documentation 2022-09-02 22:23:00 +01:00
utils ansible_mitogen: Handle AnsibleUnsafeText et al in Ansible >= 7 2024-04-04 09:11:23 +01:00
__init__.py ansible: restructure to avoid intermediate imports 2018-03-19 21:58:29 +05:45
affinity.py ansible_mitogen: Standardise __future__ imports to match Ansible 2022-04-23 11:17:25 +01:00
connection.py ansible_mitogen: Handle AnsibleUnsafeText et al in Ansible >= 7 2024-04-04 09:11:23 +01:00
loaders.py ansible_mitogen: Add Ansible 7 support 2024-04-04 09:11:23 +01:00
logging.py ansible_mitogen: Standardise __future__ imports to match Ansible 2022-04-23 11:17:25 +01:00
mixins.py ansible_mitogen: Handle AnsibleUnsafeText et al in Ansible >= 7 2024-04-04 09:11:23 +01:00
module_finder.py mitogen: Support PEP 451 ModuleSpec API, required for Python 3.12 2024-03-17 14:57:57 +00:00
parsing.py ansible_mitogen: Standardise __future__ imports to match Ansible 2022-04-23 11:17:25 +01:00
planner.py Add ansible.builtin.dnf to ALWAYS_FORK_MODULES 2022-06-19 11:19:25 +01:00
process.py Remove vendored mitogen.compat.simplejson 2023-02-05 13:45:47 +00:00
runner.py mitogen: Support PEP 451 ModuleSpec API, required for Python 3.12 2024-03-17 14:57:57 +00:00
services.py ansible_mitogen: Handle AnsibleUnsafeText et al in Ansible >= 7 2024-04-04 09:11:23 +01:00
strategy.py ansible_mitogen: Standardise __future__ imports to match Ansible 2022-04-23 11:17:25 +01:00
target.py Remove vendored mitogen.compat.simplejson 2023-02-05 13:45:47 +00:00
transport_config.py ansible_mitogen: correct typo in MitogenViaSpec.mitogen_lxc_path() 2023-02-05 17:43:18 +00:00