Skip to content

Commit

Permalink
Merge pull request #686 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 28, 2022
2 parents 971cda6 + 9065eca commit 32ae9e2
Show file tree
Hide file tree
Showing 26 changed files with 1,589 additions and 530 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ script:
- set +e

# Run unit, kernel tests
- # ./vendor/bin/phpunit --debug --colors --testsuite=unit,kernel
- ./vendor/bin/phpunit --debug --colors --testsuite=unit

# Drupal install
- mysql -e "CREATE DATABASE drupal;"
Expand Down
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.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"drupal/core-composer-scaffold": "^9.3.8",
"drupal/core-project-message": "^9.3.8",
"drupal/core-recommended": "^9.3.8",
"drupal/csp": "^1.16",
"drupal/ctools": "^4.0",
"drupal/date_recur": "^3.0",
"drupal/date_recur_modular": "^3.0",
Expand Down
Loading

0 comments on commit 32ae9e2

Please sign in to comment.