summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authorAlbert Ting <altlist@gmail.com>2015-08-23 14:16:49 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-08-23 14:16:49 +0200
commit5fd2b62a573eb1eaef834367008be0e24e1fca57 (patch)
tree9209a7ad3b51e6de6efe0bd2b1670774e958b464 /attachment.cgi
parent19d20ef6c3b76145e2ea0ebf96a7519eda3bf64d (diff)
downloadbugzilla-5fd2b62a573eb1eaef834367008be0e24e1fca57.tar.gz
bugzilla-5fd2b62a573eb1eaef834367008be0e24e1fca57.tar.xz
Bug 1196517: Properly set the disposition for non-viewable attachments
r=LpSolit a=sgreen
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 7df230d79..e7fadf66f 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -346,7 +346,8 @@ sub view {
local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 10000;
$filename = encode('MIME-Q', $filename);
- my $disposition = Bugzilla->params->{'allow_attachment_display'} ? 'inline' : 'attachment';
+ my $disposition = (Bugzilla->params->{'allow_attachment_display'}
+ && $attachment->is_viewable) ? 'inline' : 'attachment';
# Don't send a charset header with attachments--they might not be UTF-8.
# However, we do allow people to explicitly specify a charset if they