From 721c112eb5133487ec9112c3e94dc5d00061699c Mon Sep 17 00:00:00 2001 From: Matt Tyson Date: Mon, 3 Sep 2012 15:31:57 +0800 Subject: Bug 786889: Add missing 'Summary (first 60 chars)' header to CSV output r=glob, a=LpSolit --- template/en/default/global/field-descs.none.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/template/en/default/global/field-descs.none.tmpl b/template/en/default/global/field-descs.none.tmpl index 21f41c86c..3e86e9bad 100644 --- a/template/en/default/global/field-descs.none.tmpl +++ b/template/en/default/global/field-descs.none.tmpl @@ -132,6 +132,7 @@ "setting" => "Setting", "settings" => "Settings", "short_desc" => "Summary", + "short_short_desc" => "Summary", "status_whiteboard" => "Whiteboard", "tag.name" => "Tags", "target_milestone" => "Target Milestone", -- cgit v1.2.3-24-g4f1b From 36d868c007f778e72ae31c521595515f428edae0 Mon Sep 17 00:00:00 2001 From: Matt Selsky Date: Sun, 9 Sep 2012 11:06:39 -0700 Subject: Bug 671612: Send "X-Content-Type-Options: nosniff" with every response r/a=LpSolit --- Bugzilla/Attachment/PatchReader.pm | 2 -- Bugzilla/CGI.pm | 4 ++++ attachment.cgi | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Bugzilla/Attachment/PatchReader.pm b/Bugzilla/Attachment/PatchReader.pm index 01a624a8f..cfc7610f4 100644 --- a/Bugzilla/Attachment/PatchReader.pm +++ b/Bugzilla/Attachment/PatchReader.pm @@ -37,7 +37,6 @@ sub process_diff { $last_reader->sends_data_to(new PatchReader::DiffPrinter::raw()); # Actually print out the patch. print $cgi->header(-type => 'text/plain', - -x_content_type_options => "nosniff", -expires => '+3M'); disable_utf8(); $reader->iterate_string('Attachment ' . $attachment->id, $attachment->data); @@ -119,7 +118,6 @@ sub process_interdiff { $last_reader->sends_data_to(new PatchReader::DiffPrinter::raw()); # Actually print out the patch. print $cgi->header(-type => 'text/plain', - -x_content_type_options => "nosniff", -expires => '+3M'); disable_utf8(); } diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 7135f7c48..a16ae6686 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -316,6 +316,10 @@ sub header { unshift(@_, '-x_frame_options' => 'SAMEORIGIN'); } + # Add X-Content-Type-Options header to prevent browsers sniffing + # the MIME type away from the declared Content-Type. + unshift(@_, '-x_content_type_options' => 'nosniff'); + return $self->SUPER::header(@_) || ""; } diff --git a/attachment.cgi b/attachment.cgi index 04bad37b3..64f78dc36 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -408,8 +408,7 @@ sub view { } print $cgi->header(-type=>"$contenttype; name=\"$filename\"", -content_disposition=> "$disposition; filename=\"$filename\"", - -content_length => $attachment->datasize, - -x_content_type_options => "nosniff"); + -content_length => $attachment->datasize); disable_utf8(); print $attachment->data; } -- cgit v1.2.3-24-g4f1b