Use the same markdown library for displaying as for editing - could enable a security run_pyl

This commit is contained in:
Dan 2023-02-06 12:20:29 -05:00
parent df49b15292
commit 54be9535f6
2 changed files with 3 additions and 5 deletions

View File

@ -3634,4 +3634,4 @@
"clientPolicies" : {
"policies" : [ ]
}
}
}

View File

@ -565,11 +565,9 @@ def _render_jinja_template(unprocessed_template: str, spiff_task: SpiffTask) ->
raise wfe from template_error
except Exception as error:
type, value, tb = exc_info()
wfe = WorkflowTaskException(
str(error), task=spiff_task, exception=error
)
wfe = WorkflowTaskException(str(error), task=spiff_task, exception=error)
while tb:
if tb.tb_frame.f_code.co_filename == '<template>':
if tb.tb_frame.f_code.co_filename == "<template>":
wfe.line_number = tb.tb_lineno
wfe.error_line = unprocessed_template.split("\n")[tb.tb_lineno - 1]
tb = tb.tb_next