diff options
author | Brian Coca <bcoca@users.noreply.github.com> | 2020-10-30 17:13:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-30 17:13:12 -0400 |
commit | 4b673484f06fa9464601c27706c8a43d1e11bbcb (patch) | |
tree | 1aec7e4e0b871465eee0470d0d34ea932e2fadbb /lib/ansible/template | |
parent | 4fb336cef13e4b6e2b46a4d30e60d1d40cbbbd90 (diff) | |
download | ansible-4b673484f06fa9464601c27706c8a43d1e11bbcb.tar.gz |
rethink wording (#70028)
* rethink wording
* removed unrequired requirement
* fix tests
* fixed versions
Co-authored-by: Sloane Hertel <shertel@redhat.com>
Diffstat (limited to 'lib/ansible/template')
-rw-r--r-- | lib/ansible/template/safe_eval.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/template/safe_eval.py b/lib/ansible/template/safe_eval.py index 43ce250c98..2c0bfff8f9 100644 --- a/lib/ansible/template/safe_eval.py +++ b/lib/ansible/template/safe_eval.py @@ -112,7 +112,7 @@ def safe_eval(expr, locals=None, include_exceptions=False): for test in test_loader.all(): test_list.extend(test.tests().keys()) - CALL_WHITELIST = C.DEFAULT_CALLABLE_WHITELIST + filter_list + test_list + CALL_ENABLED = C.CALLABLE_ACCEPT_LIST + filter_list + test_list class CleansingNodeVisitor(ast.NodeVisitor): def generic_visit(self, node, inside_call=False): @@ -124,7 +124,7 @@ def safe_eval(expr, locals=None, include_exceptions=False): # Disallow calls to builtin functions that we have not vetted # as safe. Other functions are excluded by setting locals in # the call to eval() later on - if hasattr(builtins, node.id) and node.id not in CALL_WHITELIST: + if hasattr(builtins, node.id) and node.id not in CALL_ENABLED: raise Exception("invalid function: %s" % node.id) # iterate over all child nodes for child_node in ast.iter_child_nodes(node): |