From fe57c38b465ed4e1dd22f4cd4317833ba6a7929e Mon Sep 17 00:00:00 2001 From: Sadie Bartholomew Date: Wed, 6 Feb 2019 12:38:44 +0000 Subject: [PATCH] Autoescape input markup to remove code injection vulnerability --- lib/cylc/cylc-review/template/cycles.html | 32 +++++++------ lib/cylc/cylc-review/template/job-entry.html | 24 +++++----- lib/cylc/cylc-review/template/suites.html | 4 +- lib/cylc/cylc-review/template/taskjobs.html | 48 ++++++++++---------- lib/cylc/cylc-review/template/view.html | 4 +- lib/cylc/review.py | 9 +++- 6 files changed, 65 insertions(+), 56 deletions(-) diff --git a/lib/cylc/cylc-review/template/cycles.html b/lib/cylc/cylc-review/template/cycles.html index ae2d02d253a..ac169f066db 100644 --- a/lib/cylc/cylc-review/template/cycles.html +++ b/lib/cylc/cylc-review/template/cycles.html @@ -38,8 +38,8 @@
{% for k, v in [ - ("time_desc", "new->old"), - ("time_asc", "old->new"), + ("time_desc", "new->old" | safe ), + ("time_asc", "old->new" | safe ), ("name_asc", "a-z suite name"), ("name_desc", "z-a suite name"), ] -%} diff --git a/lib/cylc/cylc-review/template/taskjobs.html b/lib/cylc/cylc-review/template/taskjobs.html index 49ada43bc0a..80748d6384e 100644 --- a/lib/cylc/cylc-review/template/taskjobs.html +++ b/lib/cylc/cylc-review/template/taskjobs.html @@ -24,8 +24,8 @@
{% for key, name, value in [ - ("cycles", - "Cycles (before, after or patterns): <CYCLE | >CYCLE | GLOB ...", cycles), + ("cycles", "Cycles (before, after or patterns):" ~ + "<CYCLE | >CYCLE | GLOB ..." | safe , cycles), ("tasks", "Task Name Globs", tasks), ] -%}
@@ -107,28 +107,28 @@