summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorReed Loden <reed@reedloden.com>2010-12-18 09:40:24 +0100
committerReed Loden <reed@reedloden.com>2010-12-18 09:40:24 +0100
commitc9c81ee7156fc47d834317644baa25cec7cf16e4 (patch)
tree532fa36c8aeabfc9a3397dc78b67aa6bf6f5a0e8 /Bugzilla
parent374ee5c8a6ad04213de38be4557398bb458219a9 (diff)
downloadbugzilla-c9c81ee7156fc47d834317644baa25cec7cf16e4.tar.gz
bugzilla-c9c81ee7156fc47d834317644baa25cec7cf16e4.tar.xz
Bug 475894 - Send the 'X-Frame-Options: SAMEORIGIN' header to help protect against clickjacking.
[r=mkanat a=mkanat]
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/CGI.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index b32f76ae0..7c42d6f63 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -287,6 +287,12 @@ sub header {
unshift(@_, '-strict_transport_security' => $sts_opts);
}
+ # Add X-Frame-Options header to prevent framing and subsequent
+ # possible clickjacking problems.
+ unless ($self->url_is_attachment_base) {
+ unshift(@_, '-x_frame_options' => 'SAMEORIGIN');
+ }
+
return $self->SUPER::header(@_) || "";
}