From 57cb23ac81dd43148d5e04618e780489216e49bb 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 8d05b882..61b99486 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}}