From: Frédéric Buclin
Date: Mon, 9 Jan 2012 23:53:33 +0000 (+0100)
Subject: Bug 716283: Clickjacking in the attachment "Details" page allows to bypass token...
X-Git-Tag: bugzilla-4.2rc2~21
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74f713457a1d50b39a564cb0a647b2d937473e24;p=thirdparty%2Fbugzilla.git
Bug 716283: Clickjacking in the attachment "Details" page allows to bypass token checks
r=dkl a=LpSolit
---
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index fbe3a9c799..95ad4d335d 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -197,6 +197,16 @@
[% END %]
+ [% ELSIF attachment.contenttype == "text/html" %]
+ [%# For security reasons (clickjacking, embedded scripts), we never
+ # render HTML pages from here. The source code is displayed instead. %]
+ [% INCLUDE global/textarea.html.tmpl
+ id = 'viewFrame'
+ minrows = 10
+ cols = 80
+ defaultcontent = attachment.data
+ readonly = 'readonly'
+ %]
[% ELSE %]