From da37f4c83f413075f2db46206c870dee6d95d33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 10 Mar 2020 14:56:27 +0100 Subject: [PATCH] XSS: Fixed history XSS issue (#22680) --- pkg/components/dashdiffs/formatter_basic.go | 8 ++++---- pkg/components/dashdiffs/formatter_json.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/components/dashdiffs/formatter_basic.go b/pkg/components/dashdiffs/formatter_basic.go index 4c8e03252a3..b361c83a80c 100644 --- a/pkg/components/dashdiffs/formatter_basic.go +++ b/pkg/components/dashdiffs/formatter_basic.go @@ -339,11 +339,11 @@ var ( {{ if .Old }} -
{{ .Old }}
+
{{ .Old }}
{{ end }} {{ if .New }} -
{{ .New }}
+
{{ .New }}
{{ end }} {{ if .LineStart }} @@ -380,11 +380,11 @@ var (
{{ if .Old }} -
{{ .Old }}
+
{{ .Old }}
{{ end }} {{ if .New }} -
{{ .New }}
+
{{ .New }}
{{ end }}
diff --git a/pkg/components/dashdiffs/formatter_json.go b/pkg/components/dashdiffs/formatter_json.go index a9aa788df61..10c7befe1bf 100644 --- a/pkg/components/dashdiffs/formatter_json.go +++ b/pkg/components/dashdiffs/formatter_json.go @@ -59,7 +59,7 @@ var ( {{if .RightLine }}{{ .RightLine }}{{ end }} - + {{ .Text }} {{ ctos .Change }}