The J!German translation team provides German translation for Joomla!
GNU General Public License v2.0
25
stars
46
forks
source link
[4.0] Remove com_csp and move the CSP configuration to the HttpHeaders plugin #1727
Closed
jgerman-bot closed 3 years ago
New language relevant PR in upstream repo: https://github.com/joomla/joomla-cms/pull/33550 Here are the upstream changes:
Click to expand the diff!
```diff diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a474229d00c1f..4051d1c5bc5bb 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -45,8 +45,6 @@ RoboFile.php @rdeutz @hackwar # CSP Tooling plugins/system/httpheaders/* @zero-24 -administrator/components/com_csp/* @zero-24 -components/com_csp/* @zero-24 # Web Authentication (WebAuthn) plugins/system/webauthn/* @nikosdion diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index ed1e93c4f64e4..531e3ca0263e1 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -5248,14 +5248,31 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/administrator/components/com_admin/src/Controller/ProfileController.php', '/administrator/components/com_admin/src/Model/ProfileModel.php', '/administrator/components/com_admin/src/View/Profile/HtmlView.php', + '/administrator/components/com_csp/access.xml', + '/administrator/components/com_csp/config.xml', + '/administrator/components/com_csp/csp.xml', + '/administrator/components/com_csp/forms/filter_reports.xml', + '/administrator/components/com_csp/services/provider.php', + '/administrator/components/com_csp/src/Controller/DisplayController.php', + '/administrator/components/com_csp/src/Controller/ReportsController.php', + '/administrator/components/com_csp/src/Helper/ReporterHelper.php', + '/administrator/components/com_csp/src/Model/ReportModel.php', + '/administrator/components/com_csp/src/Model/ReportsModel.php', + '/administrator/components/com_csp/src/Table/ReportTable.php', + '/administrator/components/com_csp/src/View/Reports/HtmlView.php', + '/administrator/components/com_csp/tmpl/reports/default.php', + '/administrator/components/com_csp/tmpl/reports/default.xml', '/administrator/components/com_admin/tmpl/profile/edit.php', '/administrator/components/com_config/tmpl/application/default_ftp.php', '/administrator/components/com_config/tmpl/application/default_ftplogin.php', '/administrator/components/com_fields/src/Field/SubfieldstypeField.php', '/administrator/components/com_installer/tmpl/installer/default_ftp.php', + '/administrator/language/en-GB/com_csp.ini', + '/administrator/language/en-GB/com_csp.sys.ini', '/administrator/language/en-GB/plg_fields_subfields.ini', '/administrator/language/en-GB/plg_fields_subfields.sys.ini', '/administrator/templates/atum/Service/HTML/Atum.php', + '/components/com_csp/src/Controller/ReportController.php', '/components/com_menus/src/Controller/DisplayController.php', '/libraries/vendor/beberlei/assert/phpstan-code.neon', '/libraries/vendor/beberlei/assert/phpstan-tests.neon', @@ -6905,8 +6922,23 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/libraries/vendor/ozdemirburak/iris', '/libraries/vendor/ozdemirburak', '/components/com_menus/src/Controller', + '/components/com_csp/src/Controller', + '/components/com_csp/src', + '/components/com_csp', '/administrator/templates/atum/Service/HTML', '/administrator/templates/atum/Service', + '/administrator/components/com_csp/tmpl/reports', + '/administrator/components/com_csp/tmpl', + '/administrator/components/com_csp/src/View/Reports', + '/administrator/components/com_csp/src/View', + '/administrator/components/com_csp/src/Table', + '/administrator/components/com_csp/src/Model', + '/administrator/components/com_csp/src/Helper', + '/administrator/components/com_csp/src/Controller', + '/administrator/components/com_csp/src', + '/administrator/components/com_csp/services', + '/administrator/components/com_csp/forms', + '/administrator/components/com_csp', '/administrator/components/com_admin/tmpl/profile', '/administrator/components/com_admin/src/View/Profile', '/administrator/components/com_admin/forms', @@ -6983,7 +7015,7 @@ public function updateAssets($installer) { // List all components added since 4.0 $newComponents = array( - 'com_csp', + // Components to be added here ); foreach ($newComponents as $component) diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql index a25eb4c8be0fb..65a7046e3392c 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql @@ -1,18 +1 @@ --- --- Table structure for table `#__csp` --- - -CREATE TABLE IF NOT EXISTS `#__csp` ( - `id` int NOT NULL AUTO_INCREMENT, - `document_uri` varchar(500) NOT NULL DEFAULT '', - `blocked_uri` varchar(500) NOT NULL DEFAULT '', - `directive` varchar(500) NOT NULL DEFAULT '', - `client` varchar(500) NOT NULL DEFAULT '', - `created` datetime NOT NULL, - `modified` datetime NOT NULL, - `published` tinyint NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; - -INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES -(0, 'com_csp', 'component', 'com_csp', '', 1, 1, 1, 0, '', '{}', '', 0, '0000-00-00 00:00:00', 0, 0); +-- This has been removed as com_csp has been removed from the final build diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-16.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-16.sql index 2899b721b7700..65a7046e3392c 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-16.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-16.sql @@ -1 +1 @@ -DELETE FROM `#__menu` WHERE `link` = 'index.php?option=com_csp' AND `menutype` = 'main'; +-- This has been removed as com_csp has been removed from the final build diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-03-25.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-03-25.sql index 50649a1ec8452..5f72531aef0a6 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-03-25.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-03-25.sql @@ -39,7 +39,6 @@ WHERE (`type` = 'component' AND `element` IN ( 'com_privacy', 'com_actionlogs', 'com_workflow', - 'com_csp', 'com_mails' )) OR (`type` = 'module' AND `client_id` = 0 AND `element` IN ( diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2021-05-04.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2021-05-04.sql new file mode 100644 index 0000000000000..5c0fa009f5215 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2021-05-04.sql @@ -0,0 +1,2 @@ +DELETE FROM `#__extensions` WHERE `name` = 'com_csp' and `type` = 'component' and `element` = 'com_csp'; +DROP TABLE `#__csp`; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql index aa8383b195e60..65a7046e3392c 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql @@ -1,18 +1 @@ --- --- Table structure for table `#__csp` --- - -CREATE TABLE IF NOT EXISTS "#__csp" ( - "id" serial NOT NULL, - "document_uri" varchar(500) NOT NULL DEFAULT '', - "blocked_uri" varchar(500) NOT NULL DEFAULT '', - "directive" varchar(500) NOT NULL DEFAULT '', - "client" varchar(500) NOT NULL DEFAULT '', - "created" timestamp without time zone NOT NULL, - "modified" timestamp without time zone NOT NULL, - "published" smallint DEFAULT 0 NOT NULL, - PRIMARY KEY ("id") -); - -INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "checked_out", "checked_out_time", "ordering", "state") VALUES -(0, 'com_csp', 'component', 'com_csp', '', 1, 1, 1, 0, '', '{}', '', 0, '1970-01-01 00:00:00', 0, 0); +-- This has been removed as com_csp has been removed from the final build diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-07-16.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-07-16.sql index 2259b9e932770..65a7046e3392c 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-07-16.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-07-16.sql @@ -1 +1 @@ -DELETE FROM "#__menu" WHERE "link" = 'index.php?option=com_csp' AND "menutype" = 'main'; +-- This has been removed as com_csp has been removed from the final build diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-03-25.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-03-25.sql index 3586f07edac94..0d45c2156d656 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-03-25.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-03-25.sql @@ -41,7 +41,6 @@ WHERE ("type" = 'component' AND "element" IN ( 'com_privacy', 'com_actionlogs', 'com_workflow', - 'com_csp', 'com_mails' )) OR ("type" = 'module' AND "client_id" = 0 AND "element" IN ( diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2021-05-04.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2021-05-04.sql new file mode 100644 index 0000000000000..5c0fa009f5215 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2021-05-04.sql @@ -0,0 +1,2 @@ +DELETE FROM `#__extensions` WHERE `name` = 'com_csp' and `type` = 'component' and `element` = 'com_csp'; +DROP TABLE `#__csp`; diff --git a/administrator/components/com_csp/access.xml b/administrator/components/com_csp/access.xml deleted file mode 100644 index 5582ccc729ee1..0000000000000 --- a/administrator/components/com_csp/access.xml +++ /dev/null @@ -1,12 +0,0 @@ - -