]> 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:45:04 +0000 (00:45 -0800)
committerReed Loden <reed@reedloden.com>
Sat, 18 Dec 2010 08:45:04 +0000 (00:45 -0800)
[r=mkanat a=mkanat]

Bugzilla/CGI.pm

index c5cb0fa62e620151ec932597756c09e57d1563ed..bd948fc49a2b6877978314d6d3d01653f89122dd 100644 (file)
@@ -299,6 +299,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(@_) || "";
 }