Changes in [2910:69efb1571e90:2906:6e7e433ef6d3]
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r2907 r2858 411 411 ($post_id ? $page_title_edit : $page_title) => '' 412 412 )) 413 , array(414 'x-frame-allow' => $core->blog->url415 )416 413 ); 417 414 -
inc/admin/lib.dc.page.php
r2909 r2871 17 17 { 18 18 private static $loaded_js = array(); 19 private static $xframe_loaded = false;20 19 private static $N_TYPES = array( 21 20 "success" => "success", … … 55 54 56 55 # Top of admin page 57 public static function open($title='',$head='',$breadcrumb='' ,$options=array())56 public static function open($title='',$head='',$breadcrumb='') 58 57 { 59 58 global $core; … … 92 91 93 92 // Prevents Clickjacking as far as possible 94 if (isset($options['x-frame-allow'])) { 95 self::setXFrameOptions($options['x-frame-allow']); 96 } else { 97 self::setXFrameOptions(); 98 } 93 header('X-Frame-Options: SAMEORIGIN'); // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+ 94 99 95 echo 100 96 '<!DOCTYPE html>'. … … 923 919 return $GLOBALS['core']->adminurl->get('load.plugin.file',array('pf' => $file)); 924 920 } 925 926 public static function setXFrameOptions($origin=null) {927 if (self::$xframe_loaded) {928 return;929 }930 if ($origin !== null) {931 $url = parse_url($origin);932 header(sprintf('X-Frame-Options: %s', is_array($url)?($url['scheme'].'://'.$url['host']):'SAMEORIGIN'));933 } else {934 header('X-Frame-Options: SAMEORIGIN'); // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+935 }936 self::$xframe_loaded = true;937 938 }939 921 } -
plugins/pages/page.php
r2909 r2856 304 304 } 305 305 306 dcPage::setXFrameOptions($core->blog->url);307 306 ?> 308 307 <html>
Note: See TracChangeset
for help on using the changeset viewer.