[SIGNED-OFF] Bug 16210: Set X-Frame-Options to SAMEORIGIN in 2 other places
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 8 Apr 2016 09:04:20 +0000 (10:04 +0100)
committerBrendan Gallagher <bredan@bywatersolutions.com>
Wed, 20 Apr 2016 16:06:32 +0000 (16:06 +0000)
The login page should not be displayed if the page is displayed in a
frame.

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
C4/Auth.pm

index bff7fcd..e3aecec 100644 (file)
@@ -194,9 +194,11 @@ sub get_template_and_user {
 
             $template->param( loginprompt => 1 );
             print $in->{query}->header(
-                -type    => 'text/html',
-                -charset => 'utf-8',
-                -cookie  => $cookie,
+                {   type              => 'text/html',
+                    charset           => 'utf-8',
+                    cookie            => $cookie,
+                    'X-Frame-Options' => 'SAMEORIGIN'
+                }
               ),
             $template->output;
             safe_exit;
@@ -1307,9 +1309,11 @@ sub checkauth {
     #    $cookie = $query->cookie(CGISESSID => $session->id
     #   );
     print $query->header(
-        -type    => 'text/html',
-        -charset => 'utf-8',
-        -cookie  => $cookie
+        {   type              => 'text/html',
+            charset           => 'utf-8',
+            cookie            => $cookie,
+            'X-Frame-Options' => 'SAMEORIGIN'
+        }
       ),
       $template->output;
     safe_exit;