Test: ensure __builtins__ can't workaround secure driver evaluation

This commit is contained in:
Campbell Barton 2023-05-27 15:42:25 +10:00
parent 26e1d63b67
commit 019362bd96
1 changed files with 1 additions and 0 deletions

View File

@ -174,6 +174,7 @@ class TestRejectModuleAccess(unittest.TestCase, TestExprMixIn_Reject):
"__import__('os').expect_os_unreachable()",
"exec(\"__import__('os').expect_os_unreachable()\")",
"(globals().update(__import__('os').__dict__), expect_os_unreachable())",
"__builtins__['getattr'](__builtins__['__import__']('os'), 'expect_os_unreachable')()",
)
# Ensure the functions are actually called.