Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
76d1a3dc
Commit
76d1a3dc
authored
Jan 08, 2016
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1235772: Display all text/* attachments as plain text in the "Details" page
r=gerv
parent
160a9604
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
edit.html.tmpl
template/en/default/attachment/edit.html.tmpl
+7
-2
No files found.
template/en/default/attachment/edit.html.tmpl
View file @
76d1a3dc
...
...
@@ -190,9 +190,12 @@
[% END %]
</a>
</p>
[% ELSIF attachment.contenttype
== "text/html"
%]
[% ELSIF attachment.contenttype
.match('^text/')
%]
[%# For security reasons (clickjacking, embedded scripts), we never
# render HTML pages from here. The source code is displayed instead. %]
# render HTML, XML or SVG pages directly. The source code for all
# text/* MIME types is displayed instead. If someone tries to abuse
# Bugzilla by manually editing the MIME type, it will be caught
# by the iframe below, thanks to its 'sandbox' attribute. %]
[% INCLUDE global/textarea.html.tmpl
id = 'viewFrame'
minrows = 10
...
...
@@ -201,6 +204,8 @@
readonly = 'readonly'
%]
[% ELSE %]
[%# The 'sandbox' attribute causes all scripts and form submissions
# embedded in the attachment to be disabled, for security reasons. %]
<iframe id="viewFrame" src="attachment.cgi?id=[% attachment.id %]" sandbox>
<b>You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
<a href="attachment.cgi?id=[% attachment.id %]">View the attachment on a separate page</a>.</b>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment