diff --git a/core/assets/scaffold/files/default.settings.php b/core/assets/scaffold/files/default.settings.php index ee3b49c..3d8ff98 100644 --- a/core/assets/scaffold/files/default.settings.php +++ b/core/assets/scaffold/files/default.settings.php @@ -616,20 +616,6 @@ # ini_set('pcre.backtrack_limit', 200000); # ini_set('pcre.recursion_limit', 200000); -/** - * Add Permissions-Policy header to disable Google FLoC. - * - * By default, Drupal sends the 'Permissions-Policy: interest-cohort=()' header - * to disable Google's Federated Learning of Cohorts feature, introduced in - * Chrome 89. - * - * See https://en.wikipedia.org/wiki/Federated_Learning_of_Cohorts for more - * information about FLoC. - * - * If you don't wish to disable FLoC in Chrome, you can set this value - * to FALSE. - */ -# $settings['block_interest_cohort'] = TRUE; /** * Configuration overrides. diff --git a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php index d9ff5c6..88d3369 100644 --- a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php @@ -131,10 +131,6 @@ public function onRespond(ResponseEvent $event) { $response->headers->set('X-Content-Type-Options', 'nosniff', FALSE); $response->headers->set('X-Frame-Options', 'SAMEORIGIN', FALSE); - // Add a Permissions-Policy header to block Federated Learning of Cohorts. - if (Settings::get('block_interest_cohort', TRUE) && !$response->headers->has('Permissions-Policy')) { - $response->headers->set('Permissions-Policy', 'interest-cohort=()'); - } // If the current response isn't an implementation of the // CacheableResponseInterface, we assume that a Response is either diff --git a/core/lib/Drupal/Core/Site/Settings.php b/core/lib/Drupal/Core/Site/Settings.php index 4b3fcc4..d9b0f92 100644 --- a/core/lib/Drupal/Core/Site/Settings.php +++ b/core/lib/Drupal/Core/Site/Settings.php @@ -38,21 +38,9 @@ * @see self::handleDeprecations() */ private static $deprecatedSettings = [ - 'sanitize_input_whitelist' => [ - 'replacement' => 'sanitize_input_safe_keys', - 'message' => 'The "sanitize_input_whitelist" setting is deprecated in drupal:9.1.0 and will be removed in drupal:10.0.0. Use Drupal\Core\Security\RequestSanitizer::SANITIZE_INPUT_SAFE_KEYS instead. See https://www.drupal.org/node/3163148.', - ], - 'twig_sandbox_whitelisted_classes' => [ - 'replacement' => 'twig_sandbox_allowed_classes', - 'message' => 'The "twig_sandbox_whitelisted_classes" setting is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use "twig_sandbox_allowed_classes" instead. See https://www.drupal.org/node/3162897.', - ], - 'twig_sandbox_whitelisted_methods' => [ - 'replacement' => 'twig_sandbox_allowed_methods', - 'message' => 'The "twig_sandbox_whitelisted_methods" setting is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use "twig_sandbox_allowed_methods" instead. See https://www.drupal.org/node/3162897.', - ], - 'twig_sandbox_whitelisted_prefixes' => [ - 'replacement' => 'twig_sandbox_allowed_prefixes', - 'message' => 'The "twig_sandbox_whitelisted_prefixes" setting is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use "twig_sandbox_allowed_prefixes" instead. See https://www.drupal.org/node/3162897.', + 'block_interest_cohort' => [ + 'replacement' => '', + 'message' => 'The "block_interest_cohort" setting is deprecated in drupal:9.5.0. This setting should be removed from the settings file, since its usage has been removed. See https://www.drupal.org/node/3320787.', ], ]; diff --git a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php index 4e9a3ec..6e06b8c 100644 --- a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php +++ b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php @@ -307,20 +307,8 @@ public function testRealDeprecatedSettings(string $legacy_setting, string $expec public function providerTestRealDeprecatedSettings(): array { return [ [ - 'sanitize_input_whitelist', - 'The "sanitize_input_whitelist" setting is deprecated in drupal:9.1.0 and will be removed in drupal:10.0.0. Use Drupal\Core\Security\RequestSanitizer::SANITIZE_INPUT_SAFE_KEYS instead. See https://www.drupal.org/node/3163148.', - ], - [ - 'twig_sandbox_whitelisted_classes', - 'The "twig_sandbox_whitelisted_classes" setting is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use "twig_sandbox_allowed_classes" instead. See https://www.drupal.org/node/3162897.', - ], - [ - 'twig_sandbox_whitelisted_methods', - 'The "twig_sandbox_whitelisted_methods" setting is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use "twig_sandbox_allowed_methods" instead. See https://www.drupal.org/node/3162897.', - ], - [ - 'twig_sandbox_whitelisted_prefixes', - 'The "twig_sandbox_whitelisted_prefixes" setting is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use "twig_sandbox_allowed_prefixes" instead. See https://www.drupal.org/node/3162897.', + 'block_interest_cohort', + 'The "block_interest_cohort" setting is deprecated in drupal:9.5.0. This setting should be removed from the settings file, since its usage has been removed. See https://www.drupal.org/node/3320787.', ], ]; } diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index ee3b49c..3d8ff98 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -616,20 +616,6 @@ # ini_set('pcre.backtrack_limit', 200000); # ini_set('pcre.recursion_limit', 200000); -/** - * Add Permissions-Policy header to disable Google FLoC. - * - * By default, Drupal sends the 'Permissions-Policy: interest-cohort=()' header - * to disable Google's Federated Learning of Cohorts feature, introduced in - * Chrome 89. - * - * See https://en.wikipedia.org/wiki/Federated_Learning_of_Cohorts for more - * information about FLoC. - * - * If you don't wish to disable FLoC in Chrome, you can set this value - * to FALSE. - */ -# $settings['block_interest_cohort'] = TRUE; /** * Configuration overrides.