Skip to content

Commit 7f2f623

Browse files
fix: Allow safe_globals
1 parent 5377f0a commit 7f2f623

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

builder/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
safe_exec_flags,
2222
)
2323
from RestrictedPython import compile_restricted
24+
from RestrictedPython import safe_globals as restricted_safe_globals
2425
from werkzeug.routing import Rule
2526

2627

@@ -177,6 +178,7 @@ def get_safer_globals():
177178
out._iter_unpack_sequence_ = safe_globals["_iter_unpack_sequence_"]
178179

179180
# add common python builtins
181+
out.update(restricted_safe_globals)
180182
out.update(get_python_builtins())
181183

182184
return out

0 commit comments

Comments
 (0)