From eef5ae6fd215d2ab2cf0f317a0ac6466121298d1 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 17 Feb 2017 08:16:27 -0500 Subject: [PATCH] Security: fix XSS attack on alert --- templates/base/alert.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/base/alert.tmpl b/templates/base/alert.tmpl index 8d05b882a7c01..61b99486e27ae 100644 --- a/templates/base/alert.tmpl +++ b/templates/base/alert.tmpl @@ -1,15 +1,15 @@ {{if .Flash.ErrorMsg}}
-

{{.Flash.ErrorMsg | Safe}}

+

{{.Flash.ErrorMsg | Str2html}}

{{end}} {{if .Flash.SuccessMsg}}
-

{{.Flash.SuccessMsg | Safe}}

+

{{.Flash.SuccessMsg | Str2html}}

{{end}} {{if .Flash.InfoMsg}}
-

{{.Flash.InfoMsg | Safe}}

+

{{.Flash.InfoMsg | Str2html}}

{{end}}