[stable-2.8] also allow None Type for safe eval (#58269)
(cherry picked from commit 8555b72
)
Co-authored-by: markafarrell <mark.andrew.farrell@gmail.com>
This commit is contained in:
parent
95c2763f40
commit
9406fbe4a2
1 changed files with 1 additions and 0 deletions
|
@ -50,6 +50,7 @@ def safe_eval(expr, locals=None, include_exceptions=False):
|
|||
# also add back some builtins we do need
|
||||
'True': True,
|
||||
'False': False,
|
||||
'None': None
|
||||
}
|
||||
|
||||
# this is the whitelist of AST nodes we are going to
|
||||
|
|
Loading…
Reference in a new issue