summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-02-09 19:00:37 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-02-09 19:00:37 +0100
commit8c3ae9f0151bead35a3584cfb4c41605b7ff67f2 (patch)
treeba50cd55d003732a91cae7435ea7288021a58250 /template/en/default
parent31aa5389fb4d8b2a82227795909befe28bd2a219 (diff)
parent686f3c40af0d189f86af06cc2db3b5c4080164d6 (diff)
downloadbugzilla-8c3ae9f0151bead35a3584cfb4c41605b7ff67f2.tar.gz
bugzilla-8c3ae9f0151bead35a3584cfb4c41605b7ff67f2.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/attachment/show-multiple.html.tmpl20
1 files changed, 16 insertions, 4 deletions
diff --git a/template/en/default/attachment/show-multiple.html.tmpl b/template/en/default/attachment/show-multiple.html.tmpl
index e238e5f49..91768c0d3 100644
--- a/template/en/default/attachment/show-multiple.html.tmpl
+++ b/template/en/default/attachment/show-multiple.html.tmpl
@@ -88,10 +88,22 @@
</table>
[% IF a.is_viewable %]
- <iframe src="attachment.cgi?id=[% a.id %]" width="75%" height="350">
- <b>You cannot view the attachment on this page because your browser does not support IFRAMEs.
- <a href="attachment.cgi?id=[% a.id %]">View the attachment on a separate page</a>.</b>
- </iframe>
+ [% IF a.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
+ minrows = 10
+ cols = 80
+ defaultcontent = a.data
+ readonly = 'readonly'
+ classes = 'viewall_frame'
+ %]
+ [% ELSE %]
+ <iframe src="attachment.cgi?id=[% a.id %]" class="viewall_frame">
+ <b>You cannot view the attachment on this page because your browser does not support IFRAMEs.
+ <a href="attachment.cgi?id=[% a.id %]">View the attachment on a separate page</a>.</b>
+ </iframe>
+ [% END %]
[% ELSE %]
<p><b>
Attachment cannot be viewed because its MIME type is not text/*, image/*, or application/vnd.mozilla.*.