]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Using inlineScript instead for clickjacking check
authorSarven Capadisli <csarven@status.net>
Fri, 19 Feb 2010 12:13:05 +0000 (13:13 +0100)
committerSarven Capadisli <csarven@status.net>
Fri, 19 Feb 2010 12:13:05 +0000 (13:13 +0100)
lib/action.php

index cd84662c9623a187f15f921c8f6923586afe5983..fa9ddb9110393ed5fede1512c94d6dc142dfeb6c 100644 (file)
@@ -259,8 +259,7 @@ class Action extends HTMLOutputter // lawsuit
                 $this->script('util.js');
                 $this->script('geometa.js');
                 // Frame-busting code to avoid clickjacking attacks.
-                $this->element('script', array('type' => 'text/javascript'),
-                               'if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
+                $this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
                 Event::handle('EndShowStatusNetScripts', array($this));
                 Event::handle('EndShowLaconicaScripts', array($this));
             }