]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 475894 - Send the 'X-Frame-Options: SAMEORIGIN' header to help protect against...
authorReed Loden <reed@reedloden.com>
Sat, 18 Dec 2010 08:40:24 +0000 (00:40 -0800)
committerReed Loden <reed@reedloden.com>
Sat, 18 Dec 2010 08:40:24 +0000 (00:40 -0800)
[r=mkanat a=mkanat]

Bugzilla/CGI.pm

index b32f76ae01b37d645b3c106692d187ae3afa882c..7c42d6f63c19d60a6d985f9f7db28ce854a931d8 100644 (file)
@@ -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(@_) || "";
 }