Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion st2common/st2common/util/jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ def get_jinja_environment(allow_undefined=False, trim_blocks=True, lstrip_blocks
# Late import to avoid very expensive in-direct import (~1 second) when this function
# is not called / used
import jinja2
import jinja2.sandbox

undefined = jinja2.Undefined if allow_undefined else jinja2.StrictUndefined
env = jinja2.Environment( # nosec
env = jinja2.sandbox.SandboxedEnvironment( # nosec
undefined=undefined, trim_blocks=trim_blocks, lstrip_blocks=lstrip_blocks
)
env.filters.update(get_filters())
Expand Down