From 7e30c36d94c1bd98765d666768f7a938c5afb474 Mon Sep 17 00:00:00 2001 From: Vladislav Denisov Date: Tue, 10 Jan 2017 13:19:47 +0300 Subject: [PATCH] Add safe_builtins in Python query runner --- query_runner/python.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/query_runner/python.py b/query_runner/python.py index 6e89734e3e..7648f67f90 100644 --- a/query_runner/python.py +++ b/query_runner/python.py @@ -39,8 +39,11 @@ def __call__(self): class Python(BaseQueryRunner): safe_builtins = ( - 'sorted', 'reversed', 'min', 'max', - 'sum', 'set', + 'sorted', 'reversed', 'map', 'reduce', 'any', 'all', + 'slice', 'filter', 'len', 'next', 'enumerate' + 'sum', 'abs', 'min', 'max', 'round', 'cmp', 'divmod' + 'str', 'unicode', 'int', 'float', 'complex', + 'tuple', 'set', 'list', 'dict', 'bool', ) @classmethod