Dotclear


Ignore:
Timestamp:
01/17/15 11:53:32 (11 years ago)
Author:
Dsls
Branch:
2.7
Message:

disable clickjacking in preview when clickjacking protection is not enabled, addresses #2049

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/public/lib.urlhandlers.php

    r2915 r2919  
    110110 
    111111          header('Content-Type: '.$_ctx->content_type.'; charset=UTF-8'); 
    112  
    113           if ($_ctx->exists('xframeoption')) { 
    114                $url = parse_url($_ctx->xframeoption); 
    115                header(sprintf('X-Frame-Options: %s', is_array($url)?("ALLOW-FROM ".$url['scheme'].'://'.$url['host']):'SAMEORIGIN')); 
    116           } elseif ($core->blog->settings->system->prevents_clickjacking) { 
    117                // Prevents Clickjacking as far as possible 
    118                header('X-Frame-Options: SAMEORIGIN'); // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+ 
     112          if ($core->blog->settings->system->prevents_clickjacking) { 
     113               if ($_ctx->exists('xframeoption')) { 
     114                    $url = parse_url($_ctx->xframeoption); 
     115                    header(sprintf('X-Frame-Options: %s', is_array($url)?("ALLOW-FROM ".$url['scheme'].'://'.$url['host']):'SAMEORIGIN')); 
     116               } else { 
     117                    // Prevents Clickjacking as far as possible 
     118                    header('X-Frame-Options: SAMEORIGIN'); // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+ 
     119               } 
    119120          } 
    120121 
Note: See TracChangeset for help on using the changeset viewer.

Sites map