Skip to content

Commit

Permalink
Merge pull request #283 from UN-OCHA/develop
Browse files Browse the repository at this point in the history
Deploy 27-07-2022
  • Loading branch information
lazysoundsystem authored Jul 27, 2022
2 parents 273c10e + b0086c9 commit 17ba245
Show file tree
Hide file tree
Showing 32 changed files with 1,331 additions and 151 deletions.
18 changes: 18 additions & 0 deletions PATCHES/csp-log-format.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/src/Controller/ReportUri.php b/src/Controller/ReportUri.php
index d7229fa..744a40a 100644
--- a/src/Controller/ReportUri.php
+++ b/src/Controller/ReportUri.php
@@ -87,9 +87,11 @@ public function log($type) {
}

$this->logger
- ->info("@type <br/>\n<pre>@data</pre>", [
+ ->info("(@type) - Unmatched @directive: @blocked on page @page", [
'@type' => $type,
- '@data' => json_encode($report, JSON_PRETTY_PRINT),
+ '@directive' => $report->{'csp-report'}->{'violated-directive'},
+ '@blocked' => $report->{'csp-report'}->{'blocked-uri'},
+ '@page' => $report->{'csp-report'}->{'document-uri'},
]);

// 202: Accepted.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"drupal/core-composer-scaffold": "^9",
"drupal/core-project-message": "^9",
"drupal/core-recommended": "^9",
"drupal/csp": "^1.16",
"drupal/date_recur": "^3.2",
"drupal/external_entities": "^2.0@alpha",
"drupal/field_group": "^3.2",
Expand All @@ -56,7 +57,6 @@
"drupal/override_node_options": "^2.6",
"drupal/paragraphs_asymmetric_translation_widgets": "^1.0@beta",
"drupal/pathauto": "^1.8",
"drupal/seckit": "^2.0",
"drupal/select2": "^1.13",
"drupal/social_auth_hid": "^3.0",
"drupal/subgroup": "^1.0",
Expand Down
115 changes: 52 additions & 63 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions composer.patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"https://www.drupal.org/project/drupal/issues/2544110": "https://www.drupal.org/files/issues/2021-02-11/2544110-100.patch",
"Include database SSL/TLS info on status report": "./PATCHES/mysql-ssl-status.patch"
},
"drupal/csp": {
"Simplify log format": "PATCHES/csp-log-format.patch"
},
"drupal/layout_paragraphs" : {
"Async translation - https://www.drupal.org/project/layout_paragraphs/issues/3178277": "./PATCHES/3178277-6.patch"
},
Expand Down
8 changes: 7 additions & 1 deletion config/block.block.common_design_subtheme_page_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ uuid: 58a53cc2-0985-4abf-b29e-c079e46bbcda
langcode: en
status: true
dependencies:
module:
- system
theme:
- common_design_subtheme
_core:
Expand All @@ -17,4 +19,8 @@ settings:
label: 'Page title'
label_display: '0'
provider: core
visibility: { }
visibility:
request_path:
id: request_path
negate: true
pages: /locations
2 changes: 1 addition & 1 deletion config/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module:
components: 0
config: 0
contextual: 0
csp: 0
ctools: 0
date_recur: 0
datetime: 0
Expand Down Expand Up @@ -61,7 +62,6 @@ module:
path: 0
path_alias: 0
rdf: 0
seckit: 0
select2: 0
shortcut: 0
social_api: 0
Expand Down
55 changes: 55 additions & 0 deletions config/csp.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
_core:
default_config_hash: yOPH6uEZYRHbg2OFP-bze0jGr06fI-Gr_66W-vA8Faw
report-only:
enable: true
directives:
connect-src:
base: self
sources:
- '*.google-analytics.com'
- '*.doubleclick.net'
- '*.analytics.google.com'
font-src:
base: self
sources:
- fonts.gstatic.com
img-src:
base: self
sources:
- 'data:'
- '*.google-analytics.com'
- reliefweb.int
object-src:
base: none
script-src:
base: self
sources:
- fonts.googleapis.com
- '*.gstatic.com'
- '*.google.com'
- '*.google-analytics.com'
- cdn.jsdelivr.net
- googletagmanager.com
script-src-attr:
base: self
script-src-elem:
base: self
style-src:
base: self
style-src-attr:
base: self
style-src-elem:
base: self
frame-ancestors:
base: self
reporting:
plugin: sitelog
enforce:
enable: true
directives:
object-src:
base: none
frame-ancestors:
base: self
reporting:
plugin: sitelog
4 changes: 1 addition & 3 deletions config/field.field.group.cluster.field_paragraphs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dependencies:
config:
- field.storage.group.field_paragraphs
- group.type.cluster
- paragraphs.paragraphs_type.card_list
- paragraphs.paragraphs_type.child_groups
- paragraphs.paragraphs_type.layout
- paragraphs.paragraphs_type.twitter_feed
Expand All @@ -25,15 +24,14 @@ settings:
handler: 'default:paragraph'
handler_settings:
target_bundles:
card_list: card_list
child_groups: child_groups
layout: layout
twitter_feed: twitter_feed
negate: 1
target_bundles_drag_drop:
card_list:
weight: -31
enabled: true
enabled: false
child_groups:
weight: -23
enabled: true
Expand Down
4 changes: 1 addition & 3 deletions config/field.field.group.operation.field_paragraphs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dependencies:
config:
- field.storage.group.field_paragraphs
- group.type.operation
- paragraphs.paragraphs_type.card_list
- paragraphs.paragraphs_type.layout
- paragraphs.paragraphs_type.twitter_feed
module:
Expand All @@ -24,14 +23,13 @@ settings:
handler: 'default:paragraph'
handler_settings:
target_bundles:
card_list: card_list
layout: layout
twitter_feed: twitter_feed
negate: 1
target_bundles_drag_drop:
card_list:
weight: -31
enabled: true
enabled: false
child_groups:
weight: -23
enabled: false
Expand Down
4 changes: 1 addition & 3 deletions config/field.field.node.page.field_paragraphs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dependencies:
config:
- field.storage.node.field_paragraphs
- node.type.page
- paragraphs.paragraphs_type.card_list
- paragraphs.paragraphs_type.layout
- paragraphs.paragraphs_type.twitter_feed
module:
Expand All @@ -24,14 +23,13 @@ settings:
handler: 'default:paragraph'
handler_settings:
target_bundles:
card_list: card_list
layout: layout
twitter_feed: twitter_feed
negate: 1
target_bundles_drag_drop:
card_list:
weight: -31
enabled: true
enabled: false
child_groups:
weight: -23
enabled: false
Expand Down
Loading

0 comments on commit 17ba245

Please sign in to comment.