diff --git a/application/ajaxwebpage.class.inc.php b/application/ajaxwebpage.class.inc.php index ce991285f..12f47ffa3 100644 --- a/application/ajaxwebpage.class.inc.php +++ b/application/ajaxwebpage.class.inc.php @@ -24,33 +24,34 @@ class ajax_page extends WebPage implements iTabbedPage /** * Jquery style ready script * @var array - */ + */ protected $m_sReadyScript; protected $m_oTabs; private $m_sMenu; // If set, then the menu will be updated - - /** - * constructor for the web page - * @param string $s_title Not used - */ - function __construct($s_title) - { + + /** + * constructor for the web page + * + * @param string $s_title Not used + */ + function __construct($s_title) { $sPrintable = utils::ReadParam('printable', '0'); $bPrintable = ($sPrintable == '1'); - parent::__construct($s_title, $bPrintable); - $this->m_sReadyScript = ""; + parent::__construct($s_title, $bPrintable); + $this->m_sReadyScript = ""; //$this->add_header("Content-type: text/html; charset=utf-8"); $this->add_header('Cache-control: no-cache, no-store, must-revalidate'); - $this->add_header('Pragma: no-cache'); - $this->add_header('Expires: 0'); + $this->add_header('Pragma: no-cache'); + $this->add_header('Expires: 0'); + $this->add_header('X-Frame-Options: deny'); $this->m_oTabs = new TabManager(); $this->sContentType = 'text/html'; $this->sContentDisposition = 'inline'; $this->m_sMenu = ""; utils::InitArchiveMode(); - } + } /** * @inheritDoc diff --git a/application/csvpage.class.inc.php b/application/csvpage.class.inc.php index 0924cc38b..f6a4639bd 100644 --- a/application/csvpage.class.inc.php +++ b/application/csvpage.class.inc.php @@ -29,15 +29,15 @@ require_once(APPROOT."/application/webpage.class.inc.php"); class CSVPage extends WebPage { - function __construct($s_title) - { - parent::__construct($s_title); - $this->add_header("Content-type: text/plain; charset=".self::PAGES_CHARSET); - $this->add_header('Cache-control: no-cache, no-store, must-revalidate'); - $this->add_header('Pragma: no-cache'); - $this->add_header('Expires: 0'); + function __construct($s_title) { + parent::__construct($s_title); + $this->add_header("Content-type: text/plain; charset=".self::PAGES_CHARSET); + $this->add_header('Cache-control: no-cache, no-store, must-revalidate'); + $this->add_header('Pragma: no-cache'); + $this->add_header('Expires: 0'); + $this->add_header('X-Frame-Options: deny'); //$this->add_header("Content-Transfer-Encoding: binary"); - } + } public function output() { diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 030b0cbbb..2e9a86275 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -74,6 +74,7 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage $this->add_header('Cache-control: no-cache, no-store, must-revalidate'); $this->add_header('Pragma: no-cache'); $this->add_header('Expires: 0'); + $this->add_header('X-Frame-Options: deny'); $this->add_linked_stylesheet("../css/jquery.treeview.css"); $this->add_linked_stylesheet("../css/jquery.autocomplete.css"); $this->add_linked_stylesheet("../css/jquery-ui-timepicker-addon.css"); diff --git a/application/loginwebpage.class.inc.php b/application/loginwebpage.class.inc.php index 8294a153e..07a2fd69d 100644 --- a/application/loginwebpage.class.inc.php +++ b/application/loginwebpage.class.inc.php @@ -78,16 +78,16 @@ class LoginWebPage extends NiceWebPage public function __construct($sTitle = null) { - if($sTitle === null) - { - $sTitle = Dict::S('UI:Login:Title'); - } + if ($sTitle === null) { + $sTitle = Dict::S('UI:Login:Title'); + } parent::__construct($sTitle); $this->SetStyleSheet(); $this->add_header('Cache-control: no-cache, no-store, must-revalidate'); $this->add_header('Pragma: no-cache'); $this->add_header('Expires: 0'); + $this->add_header('X-Frame-Options: deny'); } public function SetStyleSheet() diff --git a/application/webpage.class.inc.php b/application/webpage.class.inc.php index 0134a815f..344d91542 100644 --- a/application/webpage.class.inc.php +++ b/application/webpage.class.inc.php @@ -490,6 +490,7 @@ class WebPage implements Page $this->add_header('Cache-control: no-cache, no-store, must-revalidate'); $this->add_header('Pragma: no-cache'); $this->add_header('Expires: 0'); + $this->add_header('X-Frame-Options: deny'); } /** diff --git a/application/xmlpage.class.inc.php b/application/xmlpage.class.inc.php index 3d81c5b49..3310f3772 100644 --- a/application/xmlpage.class.inc.php +++ b/application/xmlpage.class.inc.php @@ -46,8 +46,9 @@ class XMLPage extends WebPage $this->add_header('Cache-control: no-cache, no-store, must-revalidate'); $this->add_header('Pragma: no-cache'); $this->add_header('Expires: 0'); + $this->add_header('X-Frame-Options: deny'); $this->add_header("Content-location: export.xml"); - } + } public function output() { diff --git a/datamodels/2.x/combodo-db-tools/dbtools.php b/datamodels/2.x/combodo-db-tools/dbtools.php index 23c581f5c..869c4d337 100644 --- a/datamodels/2.x/combodo-db-tools/dbtools.php +++ b/datamodels/2.x/combodo-db-tools/dbtools.php @@ -458,7 +458,6 @@ try $sPageId = 'db-tools'; $oP = new iTopWebPage($sPageTitle); - $this->m_oPage->add_header('X-Frame-Options: deny'); $oP->add_saas('env-'.utils::GetCurrentEnvironment().'/combodo-db-tools/default.scss'); $oP->add( diff --git a/datamodels/2.x/itop-backup/status.php b/datamodels/2.x/itop-backup/status.php index d33615680..feeeb9b1b 100644 --- a/datamodels/2.x/itop-backup/status.php +++ b/datamodels/2.x/itop-backup/status.php @@ -37,7 +37,6 @@ try { $sTransactionId = utils::GetNewTransactionId(); $oP = new iTopWebPage(Dict::S('bkp-status-title')); - $oP->add_header('X-Frame-Options: deny'); $oP->set_base(utils::GetAbsoluteUrlAppRoot().'pages/'); $oP->add("