diff options
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): |