Dotclear


Ignore:
Timestamp:
07/24/16 14:30:20 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Put CSP activation and directives in settings, thanks Gvx for report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/dbschema/upgrade.php

    r3269 r3291  
    568568                         ' (setting_id,setting_ns,setting_value,setting_type,setting_label)'. 
    569569                         ' VALUES(\'%s\',\'system\',\'%s\',\'%s\',\'%s\')'; 
     570               # Import feed control 
    570571               $core->con->execute( 
    571572                    sprintf($strReq,'import_feed_url_control',true,'boolean','Control feed URL before import')); 
     
    576577               $core->con->execute( 
    577578                    sprintf($strReq,'import_feed_port_regexp','/^(80|443)$/','string','Authorize import feed only from this port regexp')); 
     579               # CSP directive (admin part) 
     580               $core->con->execute( 
     581                    sprintf($strReq,'csp_admin_on',true,'boolean','Send CSP header (admin)')); 
     582               $core->con->execute( 
     583                    sprintf($strReq,'csp_admin_default',"\'self\'",'string','CSP default-src directive')); 
     584               $core->con->execute( 
     585                    sprintf($strReq,'csp_admin_script',"\'self\' \'unsafe-inline\' \'unsafe-eval\'",'string','CSP script-src directive')); 
     586               $core->con->execute( 
     587                    sprintf($strReq,'csp_admin_style',"\'self\' \'unsafe-inline\'",'string','CSP style-src directive')); 
     588               $core->con->execute( 
     589                    sprintf($strReq,'csp_admin_img',"\'self\' data: media.dotaddict.org",'string','CSP img-src directive')); 
    578590          } 
    579591 
Note: See TracChangeset for help on using the changeset viewer.

Sites map