Files
ansible/changelogs/fragments/template-sandbox.yml
T
Matt DavisandMatt Clay b23aa84a49 Jinja sandbox refinement (#85385)
* DTFIX recategorize

* fix ansible-console generated task dict

* use non-deprecated task shape

* switch Jinja from ImmutableSandboxedEnvironment to SandboxedEnvironment

* Restore ability to call collection mutation methods.
* Restore ability to directly call integer bitwise operator methods.
* Adjust tests.

Co-authored-by: Matt Clay <matt@mystile.com>

---------

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 11f5563895)
2025-06-30 12:21:09 -07:00

6 lines
409 B
YAML

minor_changes:
- templating - Switched from the Jinja immutable sandbox to the standard sandbox.
This restores the ability to use mutation methods such as ``list.append`` and ``dict.update``.
- templating - Relaxed the Jinja sandbox to allow specific bitwise operations which have no filter equivalent.
The allowed methods are ``__and__``, ``__lshift__``, ``__or__``, ``__rshift__``, ``__xor__``.