Dotclear

Changeset 3921:1258fad22246


Ignore:
Timestamp:
11/10/18 14:25:37 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Some minor adjustments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.dc.page.php

    r3920 r3921  
    106106                                                                                // SQlite Clearbricks driver does not allow using single quote at beginning or end of a field value 
    107107                                                                                // so we have to use neutral values (localhost and 127.0.0.1) for some CSP directives 
    108             $csp_prefix = $core->con->driver() == 'sqlite' ? 'localhost ' : ''; // Hack for SQlite Clearbricks driver 
    109             $csp_suffix = $core->con->driver() == 'sqlite' ? ' 127.0.0.1' : ''; // Hack for SQlite Clearbricks driver 
     108            $csp_prefix = $core->con->syntax() == 'sqlite' ? 'localhost ' : ''; // Hack for SQlite Clearbricks syntax 
     109            $csp_suffix = $core->con->syntax() == 'sqlite' ? ' 127.0.0.1' : ''; // Hack for SQlite Clearbricks syntax 
    110110 
    111111            $csp['default-src'] = $core->blog->settings->system->csp_admin_default ?: 
     
    127127            if (!is_null($core->media)) { 
    128128                $csp['img-src'] .= ' ' . parse_url($core->media->root_url, PHP_URL_HOST); 
     129            } elseif (!is_null($core->blog->host)) { 
     130                // Let's try with the blog URL 
     131                $csp['img-src'] .= ' ' . parse_url($core->blog->host, PHP_URL_HOST); 
    129132            } 
    130133            # Allow everything in iframe (used by editors to preview public content) 
Note: See TracChangeset for help on using the changeset viewer.

Sites map