diff --git a/.vortex/docs/content/development/modules/contributed-modules.mdx b/.vortex/docs/content/development/modules/contributed-modules.mdx index 6c1b1a46b..8ed87de48 100644 --- a/.vortex/docs/content/development/modules/contributed-modules.mdx +++ b/.vortex/docs/content/development/modules/contributed-modules.mdx @@ -85,7 +85,7 @@ No settings override. ### Configuration -[`settings.fast_404.php`](https://github.com/drevops/vortex/blob/main/web/sites/default/includes/modules/settings.fast_404.php) sets the file extensions to intercept, whitelists the front controller and the other entry-point scripts, allows anonymous access to image style derivatives, and calls `fast404_preboot()` with those settings. +[`settings.fast_404.php`](https://github.com/drevops/vortex/blob/main/web/sites/default/includes/modules/settings.fast_404.php) sets the file extensions to intercept, whitelists the front controller and the other entry-point scripts, brings image style derivatives under the same rules so anonymous requests cannot force derivative generation, and calls `fast404_preboot()` with those settings. Path checking against the router and the URL aliases is off, as it queries the database before Drupal has connected to it. ## Generated Content diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 7a2cbd030..2bb65d0dc 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -96,15 +96,16 @@ public function testEnvironmentNoOverrides(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = '
The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; $settings['file_public_path'] = 'sites/default/files'; @@ -193,15 +194,16 @@ public function testEnvironmentOverrides(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; $settings['file_public_path'] = 'custom_public'; @@ -261,15 +263,16 @@ public function testEnvironmentLocal(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; $settings['file_public_path'] = 'sites/default/files'; @@ -331,15 +334,16 @@ public function testEnvironmentLocalContainer(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; $settings['file_public_path'] = 'sites/default/files'; @@ -444,15 +448,16 @@ public function testEnvironmentGha(): void { $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_CI; - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php index 68c5f5b92..df4bc3a09 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -268,8 +268,11 @@ public static function dataProviderFast404(): \Iterator { TRUE, [ 'fast404_exts' => '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i', - 'fast404_allow_anon_imagecache' => TRUE, - 'fast404_whitelist' => ['index.php', 'rss.xml', 'install.php', 'cron.php', 'update.php', 'xmlrpc.php'], + 'fast404_allow_anon_imagecache' => FALSE, + 'fast404_url_whitelisting' => TRUE, + 'fast404_whitelist' => ['index.php', 'rss.xml', 'cron.php', 'xmlrpc.php'], + 'fast404_path_check' => FALSE, + 'fast404_respect_redirect' => FALSE, 'fast404_html' => 'The requested URL "@path" was not found on this server.
', ], ]; @@ -279,7 +282,10 @@ public static function dataProviderFast404(): \Iterator { [ 'fast404_exts' => NULL, 'fast404_allow_anon_imagecache' => NULL, + 'fast404_url_whitelisting' => NULL, 'fast404_whitelist' => NULL, + 'fast404_path_check' => NULL, + 'fast404_respect_redirect' => NULL, 'fast404_html' => NULL, ], ]; diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast_404.php index d5fcf8950..20312a409 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast_404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.fast_404.php @@ -8,18 +8,53 @@ declare(strict_types=1); if (file_exists($contrib_path . '/fast_404/fast404.inc')) { + // Disallowed extensions. Any extension set here will not be served by Drupal + // and will get a Fast 404. This does not affect actual files on the + // filesystem, as requests hit them before defaulting to a Drupal request. $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_allow_anon_imagecache'] = TRUE; + + // Image derivative URLs fall under the same rules as any other static file. + // Anonymous requests no longer create derivatives, so the site cannot be + // taken down by hammering it with image style paths. + $settings['fast404_allow_anon_imagecache'] = FALSE; + + // Check requests against a whitelist before the extension list. Modules that + // serve their own PHP files need to be whitelisted below if they bootstrap + // Drupal. + $settings['fast404_url_whitelisting'] = TRUE; + + // Files and URLs allowed while URL whitelisting is enabled. $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; + + // Check whether the requested path corresponds to a real page by consulting + // the router and the URL aliases. This finds 404s earlier at the cost of + // adding the lookup to regular page loads. The lookup queries the database + // before Drupal has connected to it, so every path other than the front page + // answers with a redirect to the installer. Enable it once the module is + // patched with + // https://www.drupal.org/files/issues/2022-10-05/fast_404-db_preboot_errors_d9.4-2961512-23.patch + // @see https://www.drupal.org/project/fast_404/issues/2961512 + $settings['fast404_path_check'] = FALSE; + + // The path check runs before the Redirect module, so it consults the + // redirect table to avoid answering a configured redirect with a 404. Enable + // it alongside the path check above. + $settings['fast404_respect_redirect'] = FALSE; + + // Body of the 404 response. The '@path' token is replaced with the path + // being requested relative to the executed script. $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + include_once $contrib_path . '/fast_404/fast404.inc'; + // Each answered request logs a TypeError after the response is sent, because + // the module passes an array where an exception is expected. Patch it with + // https://www.drupal.org/files/issues/2023-08-24/fast_404_3x-3194034-10.patch + // @see https://www.drupal.org/project/fast_404/issues/3194034 // @phpstan-ignore-next-line fast404_preboot($settings); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/code_coverage_provider_codecov_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/code_coverage_provider_codecov_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/code_coverage_provider_codecov_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/code_coverage_provider_codecov_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast_404.php index d5fcf8950..20312a409 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast_404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.fast_404.php @@ -8,18 +8,53 @@ declare(strict_types=1); if (file_exists($contrib_path . '/fast_404/fast404.inc')) { + // Disallowed extensions. Any extension set here will not be served by Drupal + // and will get a Fast 404. This does not affect actual files on the + // filesystem, as requests hit them before defaulting to a Drupal request. $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_allow_anon_imagecache'] = TRUE; + + // Image derivative URLs fall under the same rules as any other static file. + // Anonymous requests no longer create derivatives, so the site cannot be + // taken down by hammering it with image style paths. + $settings['fast404_allow_anon_imagecache'] = FALSE; + + // Check requests against a whitelist before the extension list. Modules that + // serve their own PHP files need to be whitelisted below if they bootstrap + // Drupal. + $settings['fast404_url_whitelisting'] = TRUE; + + // Files and URLs allowed while URL whitelisting is enabled. $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; + + // Check whether the requested path corresponds to a real page by consulting + // the router and the URL aliases. This finds 404s earlier at the cost of + // adding the lookup to regular page loads. The lookup queries the database + // before Drupal has connected to it, so every path other than the front page + // answers with a redirect to the installer. Enable it once the module is + // patched with + // https://www.drupal.org/files/issues/2022-10-05/fast_404-db_preboot_errors_d9.4-2961512-23.patch + // @see https://www.drupal.org/project/fast_404/issues/2961512 + $settings['fast404_path_check'] = FALSE; + + // The path check runs before the Redirect module, so it consults the + // redirect table to avoid answering a configured redirect with a 404. Enable + // it alongside the path check above. + $settings['fast404_respect_redirect'] = FALSE; + + // Body of the 404 response. The '@path' token is replaced with the path + // being requested relative to the executed script. $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + include_once $contrib_path . '/fast_404/fast404.inc'; + // Each answered request logs a TypeError after the response is sent, because + // the module passes an array where an exception is expected. Patch it with + // https://www.drupal.org/files/issues/2023-08-24/fast_404_3x-3194034-10.patch + // @see https://www.drupal.org/project/fast_404/issues/3194034 // @phpstan-ignore-next-line fast404_preboot($settings); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php index e5274a0fa..be03bd1f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -49,7 +49,7 @@ } /** -@@ -466,6 +510,409 @@ +@@ -471,6 +515,415 @@ $settings['maintenance_theme'] = 'claro'; $settings['skip_permissions_hardening'] = TRUE; $settings['config_sync_directory'] = '../config/default'; @@ -98,15 +98,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -164,15 +165,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -230,15 +232,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -293,15 +296,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -361,15 +365,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -436,15 +441,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 7f3b316ae..36cf61854 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,7 +185,7 @@ } /** -@@ -471,6 +651,335 @@ +@@ -476,6 +656,339 @@ ]; $this->assertSettings($settings); @@ -235,15 +235,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -312,15 +313,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -389,15 +391,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -464,15 +467,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast_404.php index d5fcf8950..20312a409 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast_404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.fast_404.php @@ -8,18 +8,53 @@ declare(strict_types=1); if (file_exists($contrib_path . '/fast_404/fast404.inc')) { + // Disallowed extensions. Any extension set here will not be served by Drupal + // and will get a Fast 404. This does not affect actual files on the + // filesystem, as requests hit them before defaulting to a Drupal request. $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_allow_anon_imagecache'] = TRUE; + + // Image derivative URLs fall under the same rules as any other static file. + // Anonymous requests no longer create derivatives, so the site cannot be + // taken down by hammering it with image style paths. + $settings['fast404_allow_anon_imagecache'] = FALSE; + + // Check requests against a whitelist before the extension list. Modules that + // serve their own PHP files need to be whitelisted below if they bootstrap + // Drupal. + $settings['fast404_url_whitelisting'] = TRUE; + + // Files and URLs allowed while URL whitelisting is enabled. $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; + + // Check whether the requested path corresponds to a real page by consulting + // the router and the URL aliases. This finds 404s earlier at the cost of + // adding the lookup to regular page loads. The lookup queries the database + // before Drupal has connected to it, so every path other than the front page + // answers with a redirect to the installer. Enable it once the module is + // patched with + // https://www.drupal.org/files/issues/2022-10-05/fast_404-db_preboot_errors_d9.4-2961512-23.patch + // @see https://www.drupal.org/project/fast_404/issues/2961512 + $settings['fast404_path_check'] = FALSE; + + // The path check runs before the Redirect module, so it consults the + // redirect table to avoid answering a configured redirect with a 404. Enable + // it alongside the path check above. + $settings['fast404_respect_redirect'] = FALSE; + + // Body of the 404 response. The '@path' token is replaced with the path + // being requested relative to the executed script. $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + include_once $contrib_path . '/fast_404/fast404.inc'; + // Each answered request logs a TypeError after the response is sent, because + // the module passes an array where an exception is expected. Patch it with + // https://www.drupal.org/files/issues/2023-08-24/fast_404_3x-3194034-10.patch + // @see https://www.drupal.org/project/fast_404/issues/3194034 // @phpstan-ignore-next-line fast404_preboot($settings); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php index e5274a0fa..be03bd1f0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -49,7 +49,7 @@ } /** -@@ -466,6 +510,409 @@ +@@ -471,6 +515,415 @@ $settings['maintenance_theme'] = 'claro'; $settings['skip_permissions_hardening'] = TRUE; $settings['config_sync_directory'] = '../config/default'; @@ -98,15 +98,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -164,15 +165,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -230,15 +232,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -293,15 +296,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -361,15 +365,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -436,15 +441,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 7f3b316ae..36cf61854 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,7 +185,7 @@ } /** -@@ -471,6 +651,335 @@ +@@ -476,6 +656,339 @@ ]; $this->assertSettings($settings); @@ -235,15 +235,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -312,15 +313,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -389,15 +391,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -464,15 +467,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 7f3b316ae..36cf61854 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,7 +185,7 @@ } /** -@@ -471,6 +651,335 @@ +@@ -476,6 +656,339 @@ ]; $this->assertSettings($settings); @@ -235,15 +235,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -312,15 +313,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -389,15 +391,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -464,15 +467,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b69ba7385..8adb9246e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -162,6 +162,13 @@ +@@ -163,6 +163,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index d60a23a0d..9b896628d 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -162,6 +162,13 @@ +@@ -163,6 +163,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; @@ -12,7 +12,7 @@ $this->assertEquals($databases, $this->databases); // Verify key config overrides. -@@ -403,9 +410,9 @@ +@@ -407,9 +414,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index e94dc38c7..6eca018a9 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,7 +185,7 @@ } /** -@@ -162,6 +342,13 @@ +@@ -163,6 +343,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; @@ -199,7 +199,7 @@ $this->assertEquals($databases, $this->databases); // Verify key config overrides. -@@ -471,6 +658,335 @@ +@@ -476,6 +663,339 @@ ]; $this->assertSettings($settings); @@ -249,15 +249,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -326,15 +327,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -403,15 +405,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -478,15 +481,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b69ba7385..8adb9246e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -162,6 +162,13 @@ +@@ -163,6 +163,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b69ba7385..8adb9246e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_container_registry/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -162,6 +162,13 @@ +@@ -163,6 +163,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b69ba7385..8adb9246e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_ftp/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -162,6 +162,13 @@ +@@ -163,6 +163,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b69ba7385..8adb9246e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -162,6 +162,13 @@ +@@ -163,6 +163,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b69ba7385..8adb9246e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_s3/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -162,6 +162,13 @@ +@@ -163,6 +163,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/tests/phpunit/Drupal/EnvironmentSettingsTest.php index b69ba7385..8adb9246e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/migration_fetch_source_url/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -162,6 +162,13 @@ +@@ -163,6 +163,13 @@ $databases['default']['default']['collation'] = 'utf8_general_ci'; $databases['default']['default']['driver'] = 'mysql'; $databases['default']['default']['prefix'] = ''; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 7d0446092..abd39e062 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -231,7 +231,6 @@ +@@ -233,7 +233,6 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -6,7 +6,7 @@ $config['environment_indicator.indicator']['bg_color'] = '#006600'; $config['environment_indicator.indicator']['fg_color'] = '#ffffff'; $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_LOCAL; -@@ -301,7 +300,6 @@ +@@ -304,7 +303,6 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -14,7 +14,7 @@ $config['environment_indicator.indicator']['bg_color'] = '#006600'; $config['environment_indicator.indicator']['fg_color'] = '#ffffff'; $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_LOCAL; -@@ -413,7 +411,6 @@ +@@ -417,7 +415,6 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 5fc93177d..6d42439ac 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ 'generated_content', 'reroute_email', 'sdc_devel', -@@ -183,7 +182,6 @@ +@@ -184,7 +183,6 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -14,7 +14,7 @@ 'generated_content', 'reroute_email', 'sdc_devel', -@@ -252,7 +250,6 @@ +@@ -254,7 +252,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -22,7 +22,7 @@ 'generated_content', 'reroute_email', 'sdc_devel', -@@ -322,7 +319,6 @@ +@@ -325,7 +322,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -30,7 +30,7 @@ 'generated_content', 'reroute_email', 'sdc_devel', -@@ -435,7 +431,6 @@ +@@ -439,7 +435,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php index eb6388099..523061631 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -183,10 +181,8 @@ +@@ -184,10 +182,8 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -20,7 +20,7 @@ 'testmode', ]; $settings['config_sync_directory'] = 'custom_config'; -@@ -252,10 +248,8 @@ +@@ -254,10 +250,8 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -31,7 +31,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -322,10 +316,8 @@ +@@ -325,10 +319,8 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -42,7 +42,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -435,10 +427,8 @@ +@@ -439,10 +431,8 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 65abdc483..10a2b1fe4 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -183,10 +180,7 @@ +@@ -184,10 +181,7 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -20,7 +20,7 @@ 'testmode', ]; $settings['config_sync_directory'] = 'custom_config'; -@@ -252,10 +246,7 @@ +@@ -254,10 +248,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -31,7 +31,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -322,10 +313,7 @@ +@@ -325,10 +316,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -42,7 +42,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -435,10 +423,7 @@ +@@ -439,10 +427,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php index c744bfb51..0c29f62ee 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -10,7 +10,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -183,11 +179,7 @@ +@@ -184,11 +180,7 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -22,7 +22,7 @@ ]; $settings['config_sync_directory'] = 'custom_config'; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -252,11 +244,7 @@ +@@ -254,11 +246,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -34,7 +34,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -322,11 +310,7 @@ +@@ -325,11 +313,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -46,7 +46,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -435,11 +419,7 @@ +@@ -439,11 +423,7 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 61075c6d0..11847ccb0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -18,7 +18,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -174,9 +166,6 @@ +@@ -175,9 +167,6 @@ $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; @@ -28,7 +28,7 @@ $config['system.performance']['cache']['page']['max_age'] = 1800; $this->assertConfig($config); -@@ -183,11 +172,6 @@ +@@ -184,11 +173,6 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -40,7 +40,7 @@ ]; $settings['config_sync_directory'] = 'custom_config'; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -243,9 +227,6 @@ +@@ -245,9 +229,6 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -50,7 +50,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -252,11 +233,6 @@ +@@ -254,11 +235,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -62,7 +62,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -313,9 +289,6 @@ +@@ -316,9 +292,6 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -72,7 +72,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -322,11 +295,6 @@ +@@ -325,11 +298,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -84,7 +84,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -426,9 +394,6 @@ +@@ -430,9 +398,6 @@ $config['system.logging']['error_level'] = 'all'; $config['system.mail']['interface']['default'] = 'test_mail_collector'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -94,7 +94,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -435,11 +400,6 @@ +@@ -439,11 +404,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php index 371b43742..1d10f69a1 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_devel_sdc_devel_generated_content_testmode_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -780,156 +780,6 @@ +@@ -786,156 +786,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 053bb8fd1..e0bc8fd0e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -10,7 +10,7 @@ $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; -@@ -165,11 +160,6 @@ +@@ -166,11 +161,6 @@ $this->assertEquals($databases, $this->databases); // Verify key config overrides. @@ -22,7 +22,7 @@ $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; -@@ -232,11 +222,6 @@ +@@ -234,11 +224,6 @@ $config['automated_cron.settings']['interval'] = 0; $config['config_split.config_split.local']['status'] = TRUE; @@ -34,7 +34,7 @@ $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; -@@ -302,11 +287,6 @@ +@@ -305,11 +290,6 @@ $config['automated_cron.settings']['interval'] = 0; $config['config_split.config_split.local']['status'] = TRUE; @@ -46,7 +46,7 @@ $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; -@@ -414,11 +394,6 @@ +@@ -418,11 +398,6 @@ $config['automated_cron.settings']['interval'] = 0; $config['config_split.config_split.ci']['status'] = TRUE; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 174b28994..200542f1b 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,88 +1,93 @@ -@@ -96,17 +96,6 @@ +@@ -96,18 +96,6 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; -@@ -193,17 +182,6 @@ +@@ -194,18 +182,6 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'custom_public'; $settings['file_private_path'] = 'custom_private'; $settings['file_temp_path'] = 'custom_temp'; -@@ -261,17 +239,6 @@ +@@ -263,18 +239,6 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; -@@ -331,17 +298,6 @@ +@@ -334,18 +298,6 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; -@@ -444,17 +400,6 @@ +@@ -448,18 +400,6 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_CI; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/SwitchableSettingsTest.php index 62df4887e..e0831ba70 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_fast_404/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -30,7 +30,7 @@ class SwitchableSettingsTest extends SettingsTestCase { * Test ClamAV configs in Daemon mode with defaults. */ public function testClamavDaemonCustom(): void { -@@ -239,103 +221,6 @@ +@@ -239,109 +221,6 @@ 'environment_indicator.settings' => ['toolbar_integration' => [TRUE], 'favicon' => TRUE], ], ]; @@ -63,8 +63,11 @@ public function testClamavDaemonCustom(): void { - TRUE, - [ - 'fast404_exts' => '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i', -- 'fast404_allow_anon_imagecache' => TRUE, -- 'fast404_whitelist' => ['index.php', 'rss.xml', 'install.php', 'cron.php', 'update.php', 'xmlrpc.php'], +- 'fast404_allow_anon_imagecache' => FALSE, +- 'fast404_url_whitelisting' => TRUE, +- 'fast404_whitelist' => ['index.php', 'rss.xml', 'cron.php', 'xmlrpc.php'], +- 'fast404_path_check' => FALSE, +- 'fast404_respect_redirect' => FALSE, - 'fast404_html' => 'The requested URL "@path" was not found on this server.
', - ], - ]; @@ -74,7 +77,10 @@ public function testClamavDaemonCustom(): void { - [ - 'fast404_exts' => NULL, - 'fast404_allow_anon_imagecache' => NULL, +- 'fast404_url_whitelisting' => NULL, - 'fast404_whitelist' => NULL, +- 'fast404_path_check' => NULL, +- 'fast404_respect_redirect' => NULL, - 'fast404_html' => NULL, - ], - ]; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php index a8c42046e..4821d0fd2 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_generated_content/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ 'reroute_email', 'sdc_devel', 'testmode', -@@ -184,7 +183,6 @@ +@@ -185,7 +184,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ 'devel', @@ -14,7 +14,7 @@ 'reroute_email', 'sdc_devel', 'testmode', -@@ -253,7 +251,6 @@ +@@ -255,7 +253,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ 'devel', @@ -22,7 +22,7 @@ 'reroute_email', 'sdc_devel', 'testmode', -@@ -323,7 +320,6 @@ +@@ -326,7 +323,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ 'devel', @@ -30,7 +30,7 @@ 'reroute_email', 'sdc_devel', 'testmode', -@@ -436,7 +432,6 @@ +@@ -440,7 +436,6 @@ $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ 'devel', diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 2984bea6a..d74f40bee 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -16,7 +16,7 @@ 'sdc_devel', 'testmode', ]; -@@ -174,9 +170,6 @@ +@@ -175,9 +171,6 @@ $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; @@ -26,7 +26,7 @@ $config['system.performance']['cache']['page']['max_age'] = 1800; $this->assertConfig($config); -@@ -185,7 +178,6 @@ +@@ -186,7 +179,6 @@ $settings['config_exclude_modules'] = [ 'devel', 'generated_content', @@ -34,7 +34,7 @@ 'sdc_devel', 'testmode', ]; -@@ -243,9 +235,6 @@ +@@ -245,9 +237,6 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -44,7 +44,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -254,7 +243,6 @@ +@@ -256,7 +245,6 @@ $settings['config_exclude_modules'] = [ 'devel', 'generated_content', @@ -52,7 +52,7 @@ 'sdc_devel', 'testmode', ]; -@@ -313,9 +301,6 @@ +@@ -316,9 +304,6 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -62,7 +62,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -324,7 +309,6 @@ +@@ -327,7 +312,6 @@ $settings['config_exclude_modules'] = [ 'devel', 'generated_content', @@ -70,7 +70,7 @@ 'sdc_devel', 'testmode', ]; -@@ -426,9 +410,6 @@ +@@ -430,9 +414,6 @@ $config['system.logging']['error_level'] = 'all'; $config['system.mail']['interface']['default'] = 'test_mail_collector'; $config['system.performance']['cache']['page']['max_age'] = 900; @@ -80,7 +80,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -437,7 +418,6 @@ +@@ -441,7 +422,6 @@ $settings['config_exclude_modules'] = [ 'devel', 'generated_content', diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php index 371b43742..1d10f69a1 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_reroute_email/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -780,156 +780,6 @@ +@@ -786,156 +786,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 6cf455f91..ace5fae20 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; -@@ -170,7 +169,6 @@ +@@ -171,7 +170,6 @@ $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_SUT; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; @@ -14,7 +14,7 @@ $config['shield.settings']['shield_enable'] = TRUE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; -@@ -237,7 +235,6 @@ +@@ -239,7 +237,6 @@ $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_LOCAL; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; @@ -22,7 +22,7 @@ $config['shield.settings']['shield_enable'] = FALSE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; -@@ -307,7 +304,6 @@ +@@ -310,7 +307,6 @@ $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_LOCAL; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; @@ -30,7 +30,7 @@ $config['shield.settings']['shield_enable'] = FALSE; $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; -@@ -419,7 +415,6 @@ +@@ -423,7 +419,6 @@ $config['environment_indicator.indicator']['name'] = self::ENVIRONMENT_CI; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 1b420dba7..cbe8b8f85 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_sdc_devel/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -186,7 +185,6 @@ +@@ -187,7 +186,6 @@ 'devel', 'generated_content', 'reroute_email', @@ -14,7 +14,7 @@ 'testmode', ]; $settings['config_sync_directory'] = 'custom_config'; -@@ -255,7 +253,6 @@ +@@ -257,7 +255,6 @@ 'devel', 'generated_content', 'reroute_email', @@ -22,7 +22,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -325,7 +322,6 @@ +@@ -328,7 +325,6 @@ 'devel', 'generated_content', 'reroute_email', @@ -30,7 +30,7 @@ 'testmode', ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -438,7 +434,6 @@ +@@ -442,7 +438,6 @@ 'devel', 'generated_content', 'reroute_email', diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 8b8c997a3..a410fdb7e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -246,8 +246,6 @@ +@@ -248,8 +248,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; @@ -7,7 +7,7 @@ $this->assertConfig($config); $settings['auto_create_htaccess'] = FALSE; -@@ -316,8 +314,6 @@ +@@ -319,8 +317,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; @@ -16,7 +16,7 @@ $this->assertConfig($config); $settings['auto_create_htaccess'] = FALSE; -@@ -429,8 +425,6 @@ +@@ -433,8 +429,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 7d6a42854..2ffbc7fd0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; -@@ -171,7 +170,6 @@ +@@ -172,7 +171,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -14,7 +14,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; -@@ -238,7 +236,6 @@ +@@ -240,7 +238,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -22,7 +22,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -246,8 +243,6 @@ +@@ -248,8 +245,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; @@ -31,7 +31,7 @@ $this->assertConfig($config); $settings['auto_create_htaccess'] = FALSE; -@@ -308,7 +303,6 @@ +@@ -311,7 +306,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -39,7 +39,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -316,8 +310,6 @@ +@@ -319,8 +313,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; @@ -48,7 +48,7 @@ $this->assertConfig($config); $settings['auto_create_htaccess'] = FALSE; -@@ -420,7 +412,6 @@ +@@ -424,7 +416,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -56,7 +56,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -429,8 +420,6 @@ +@@ -433,8 +424,6 @@ $config['reroute_email.settings']['enable'] = FALSE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; $config['reroute_email.settings']['allowed'] = '*@star-wars.com'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php index c05bf5624..aea9592de 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -411,375 +411,6 @@ +@@ -417,375 +417,6 @@ } /** @@ -374,7 +374,7 @@ * Test Reroute Email config. */ #[DataProvider('dataProviderRerouteEmail')] -@@ -926,131 +557,6 @@ +@@ -932,131 +563,6 @@ [ 'reroute_email.settings' => ['enable' => FALSE], ], diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/EnvironmentSettingsTest.php index ee2b089c1..69906174e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; -@@ -171,7 +170,6 @@ +@@ -172,7 +171,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -14,7 +14,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; -@@ -238,7 +236,6 @@ +@@ -240,7 +238,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -22,7 +22,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -308,7 +305,6 @@ +@@ -311,7 +308,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; @@ -30,7 +30,7 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; -@@ -420,7 +416,6 @@ +@@ -424,7 +420,6 @@ $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/SwitchableSettingsTest.php index 371119235..23aff62f5 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -411,375 +411,6 @@ +@@ -417,375 +417,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php index 58ba7fb82..03829de78 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -930,131 +930,6 @@ +@@ -936,131 +936,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 3d89c52f6..beaebd17e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_testmode/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -187,7 +186,6 @@ +@@ -188,7 +187,6 @@ 'generated_content', 'reroute_email', 'sdc_devel', @@ -14,7 +14,7 @@ ]; $settings['config_sync_directory'] = 'custom_config'; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; -@@ -256,7 +254,6 @@ +@@ -258,7 +256,6 @@ 'generated_content', 'reroute_email', 'sdc_devel', @@ -22,7 +22,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -326,7 +323,6 @@ +@@ -329,7 +326,6 @@ 'generated_content', 'reroute_email', 'sdc_devel', @@ -30,7 +30,7 @@ ]; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; -@@ -439,7 +435,6 @@ +@@ -443,7 +439,6 @@ 'generated_content', 'reroute_email', 'sdc_devel', diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 76d02a473..efe67c1da 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_no_xmlsitemap/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -6,7 +6,7 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; -@@ -172,7 +171,6 @@ +@@ -173,7 +172,6 @@ $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = TRUE; @@ -14,7 +14,7 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; $config['reroute_email.settings']['address'] = 'webmaster@star-wars.com'; -@@ -239,7 +237,6 @@ +@@ -241,7 +239,6 @@ $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; @@ -22,7 +22,7 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; -@@ -309,7 +306,6 @@ +@@ -312,7 +309,6 @@ $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; @@ -30,7 +30,7 @@ $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; -@@ -421,7 +417,6 @@ +@@ -425,7 +421,6 @@ $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['robotstxt.settings']['content'] = "User-agent: *\nDisallow: /"; $config['shield.settings']['shield_enable'] = FALSE; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/EnvironmentSettingsTest.php index a300a6168..0ad1db4d0 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -70,43 +70,16 @@ +@@ -70,44 +70,16 @@ $this->requireSettingsFile(); @@ -28,21 +28,22 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; -@@ -165,18 +138,7 @@ +@@ -166,18 +138,7 @@ $this->assertEquals($databases, $this->databases); // Verify key config overrides. @@ -61,7 +62,7 @@ $config['system.performance']['cache']['page']['max_age'] = 1800; $this->assertConfig($config); -@@ -183,27 +145,11 @@ +@@ -184,28 +145,11 @@ // Verify settings overrides. $settings['auto_create_htaccess'] = FALSE; $settings['config_exclude_modules'] = [ @@ -75,21 +76,22 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'custom_public'; $settings['file_private_path'] = 'custom_private'; $settings['file_temp_path'] = 'custom_temp'; -@@ -231,47 +177,17 @@ +@@ -233,48 +177,17 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -123,21 +125,22 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; -@@ -301,47 +217,17 @@ +@@ -304,48 +217,17 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -171,21 +174,22 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'sites/default/files'; $settings['file_private_path'] = 'sites/default/files/private'; $settings['file_temp_path'] = '/tmp'; -@@ -413,48 +299,18 @@ +@@ -417,49 +299,18 @@ $this->requireSettingsFile(); $config['automated_cron.settings']['interval'] = 0; @@ -220,15 +224,16 @@ $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_CI; -- $settings['fast404_allow_anon_imagecache'] = TRUE; +- $settings['fast404_allow_anon_imagecache'] = FALSE; - $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; +- $settings['fast404_path_check'] = FALSE; +- $settings['fast404_respect_redirect'] = FALSE; +- $settings['fast404_url_whitelisting'] = TRUE; - $settings['fast404_whitelist'] = [ - 'index.php', - 'rss.xml', -- 'install.php', - 'cron.php', -- 'update.php', - 'xmlrpc.php', - ]; $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/SwitchableSettingsTest.php index 5b1819d71..6eaef0a47 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -30,7 +30,7 @@ class SwitchableSettingsTest extends SettingsTestCase { * Test ClamAV configs in Daemon mode with defaults. */ public function testClamavDaemonCustom(): void { -@@ -94,251 +76,6 @@ +@@ -94,257 +76,6 @@ } /** @@ -208,8 +208,11 @@ public function testClamavDaemonCustom(): void { - TRUE, - [ - 'fast404_exts' => '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i', -- 'fast404_allow_anon_imagecache' => TRUE, -- 'fast404_whitelist' => ['index.php', 'rss.xml', 'install.php', 'cron.php', 'update.php', 'xmlrpc.php'], +- 'fast404_allow_anon_imagecache' => FALSE, +- 'fast404_url_whitelisting' => TRUE, +- 'fast404_whitelist' => ['index.php', 'rss.xml', 'cron.php', 'xmlrpc.php'], +- 'fast404_path_check' => FALSE, +- 'fast404_respect_redirect' => FALSE, - 'fast404_html' => 'The requested URL "@path" was not found on this server.
', - ], - ]; @@ -219,7 +222,10 @@ public function testClamavDaemonCustom(): void { - [ - 'fast404_exts' => NULL, - 'fast404_allow_anon_imagecache' => NULL, +- 'fast404_url_whitelisting' => NULL, - 'fast404_whitelist' => NULL, +- 'fast404_path_check' => NULL, +- 'fast404_respect_redirect' => NULL, - 'fast404_html' => NULL, - ], - ]; @@ -282,7 +288,7 @@ public function testClamavDaemonCustom(): void { * Test Redis settings. */ public function testRedis(): void { -@@ -408,650 +145,6 @@ +@@ -414,650 +145,6 @@ unset($this->settings['bootstrap_container_definition']); $this->assertSettingsContains($settings); diff --git a/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/EnvironmentSettingsTest.php index abc2b5a74..a23b363e1 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ $config['system.performance']['cache']['page']['max_age'] = 900; $this->assertConfig($config); -@@ -175,8 +175,8 @@ +@@ -176,8 +176,8 @@ $config['xmlsitemap.settings']['disable_cron_regeneration'] = TRUE; $config['xmlsitemap_engines.settings']['submit'] = FALSE; $config['reroute_email.settings']['enable'] = TRUE; @@ -20,7 +20,7 @@ $config['system.performance']['cache']['page']['max_age'] = 1800; $this->assertConfig($config); -@@ -244,8 +244,8 @@ +@@ -246,8 +246,8 @@ $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; $config['reroute_email.settings']['enable'] = FALSE; @@ -31,7 +31,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -314,8 +314,8 @@ +@@ -317,8 +317,8 @@ $config['system.logging']['error_level'] = 'all'; $config['system.performance']['cache']['page']['max_age'] = 900; $config['reroute_email.settings']['enable'] = FALSE; @@ -42,7 +42,7 @@ $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $config['seckit.settings']['seckit_xss']['csp']['upgrade-req'] = FALSE; $this->assertConfig($config); -@@ -427,8 +427,8 @@ +@@ -431,8 +431,8 @@ $config['system.mail']['interface']['default'] = 'test_mail_collector'; $config['system.performance']['cache']['page']['max_age'] = 900; $config['reroute_email.settings']['enable'] = FALSE; diff --git a/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/SwitchableSettingsTest.php index a9582593f..f3a817785 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -801,7 +801,7 @@ +@@ -807,7 +807,7 @@ self::ENVIRONMENT_LOCAL, [], [ @@ -7,7 +7,7 @@ ], ]; -@@ -810,7 +810,7 @@ +@@ -816,7 +816,7 @@ self::ENVIRONMENT_CI, [], [ @@ -16,7 +16,7 @@ ], ]; -@@ -819,7 +819,7 @@ +@@ -825,7 +825,7 @@ self::ENVIRONMENT_DEV, [], [ @@ -25,7 +25,7 @@ ], ]; -@@ -828,7 +828,7 @@ +@@ -834,7 +834,7 @@ self::ENVIRONMENT_SUT, [], [ @@ -34,7 +34,7 @@ ], ]; -@@ -837,7 +837,7 @@ +@@ -843,7 +843,7 @@ self::ENVIRONMENT_STAGE, [], [ @@ -43,7 +43,7 @@ ], ]; -@@ -846,7 +846,7 @@ +@@ -852,7 +852,7 @@ self::ENVIRONMENT_PROD, [], [ diff --git a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php index 5cc551ee5..ad65210ed 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -339,78 +339,6 @@ +@@ -345,78 +345,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 7f3b316ae..36cf61854 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -185,7 +185,7 @@ } /** -@@ -471,6 +651,335 @@ +@@ -476,6 +656,339 @@ ]; $this->assertSettings($settings); @@ -235,15 +235,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -312,15 +313,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_DEV; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -389,15 +391,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_STAGE; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; @@ -464,15 +467,16 @@ + $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; + $settings['entity_update_batch_size'] = 50; + $settings['environment'] = self::ENVIRONMENT_PROD; -+ $settings['fast404_allow_anon_imagecache'] = TRUE; ++ $settings['fast404_allow_anon_imagecache'] = FALSE; + $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; + $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; ++ $settings['fast404_path_check'] = FALSE; ++ $settings['fast404_respect_redirect'] = FALSE; ++ $settings['fast404_url_whitelisting'] = TRUE; + $settings['fast404_whitelist'] = [ + 'index.php', + 'rss.xml', -+ 'install.php', + 'cron.php', -+ 'update.php', + 'xmlrpc.php', + ]; + $settings['file_public_path'] = 'sites/default/files'; diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php index 5cc551ee5..ad65210ed 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/services_no_redis/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -1,4 +1,4 @@ -@@ -339,78 +339,6 @@ +@@ -345,78 +345,6 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php index 700e7a004..8243b5bfc 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/services_none/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -61,7 +61,7 @@ * Test Config Split config. */ #[DataProvider('dataProviderConfigSplit')] -@@ -336,78 +280,6 @@ +@@ -342,78 +286,6 @@ } rmdir($path); diff --git a/.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast_404.php index 531f81035..e8cb70e97 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast_404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/web/sites/default/includes/modules/settings.fast_404.php @@ -1,7 +1,7 @@ -@@ -20,6 +20,5 @@ - ]; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast_404/fast404.inc'; +@@ -55,6 +55,5 @@ + // the module passes an array where an exception is expected. Patch it with + // https://www.drupal.org/files/issues/2023-08-24/fast_404_3x-3194034-10.patch + // @see https://www.drupal.org/project/fast_404/issues/3194034 - // @phpstan-ignore-next-line fast404_preboot($settings); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 5452ce5f3..8d536ef2f 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ */ #[Group('drupal_settings')] class EnvironmentSettingsTest extends SettingsTestCase { -@@ -403,9 +399,9 @@ +@@ -407,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast_404.php index 531f81035..e8cb70e97 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast_404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/web/sites/default/includes/modules/settings.fast_404.php @@ -1,7 +1,7 @@ -@@ -20,6 +20,5 @@ - ]; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast_404/fast404.inc'; +@@ -55,6 +55,5 @@ + // the module passes an array where an exception is expected. Patch it with + // https://www.drupal.org/files/issues/2023-08-24/fast_404_3x-3194034-10.patch + // @see https://www.drupal.org/project/fast_404/issues/3194034 - // @phpstan-ignore-next-line fast404_preboot($settings); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_dclint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_dclint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_dclint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_dclint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_docker_linters_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_docker_linters_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_docker_linters_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_docker_linters_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_hadolint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_hadolint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_hadolint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_hadolint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_jest_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_jest_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_jest_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_jest_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 5452ce5f3..8d536ef2f 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -9,7 +9,7 @@ */ #[Group('drupal_settings')] class EnvironmentSettingsTest extends SettingsTestCase { -@@ -403,9 +399,9 @@ +@@ -407,9 +403,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast_404.php index 531f81035..e8cb70e97 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast_404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/web/sites/default/includes/modules/settings.fast_404.php @@ -1,7 +1,7 @@ -@@ -20,6 +20,5 @@ - ]; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast_404/fast404.inc'; +@@ -55,6 +55,5 @@ + // the module passes an array where an exception is expected. Patch it with + // https://www.drupal.org/files/issues/2023-08-24/fast_404_3x-3194034-10.patch + // @see https://www.drupal.org/project/fast_404/issues/3194034 - // @phpstan-ignore-next-line fast404_preboot($settings); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast_404.php index 531f81035..e8cb70e97 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast_404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/web/sites/default/includes/modules/settings.fast_404.php @@ -1,7 +1,7 @@ -@@ -20,6 +20,5 @@ - ]; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast_404/fast404.inc'; +@@ -55,6 +55,5 @@ + // the module passes an array where an exception is expected. Patch it with + // https://www.drupal.org/files/issues/2023-08-24/fast_404_3x-3194034-10.patch + // @see https://www.drupal.org/project/fast_404/issues/3194034 - // @phpstan-ignore-next-line fast404_preboot($settings); } diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 49f994e8f..d65f3bd49 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_no_twig_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -1,4 +1,4 @@ -@@ -403,9 +403,9 @@ +@@ -407,9 +407,9 @@ } /** diff --git a/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast_404.php b/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast_404.php index 531f81035..e8cb70e97 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast_404.php +++ b/.vortex/installer/tests/Fixtures/handler_process/tools_none/web/sites/default/includes/modules/settings.fast_404.php @@ -1,7 +1,7 @@ -@@ -20,6 +20,5 @@ - ]; - $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; - include_once $contrib_path . '/fast_404/fast404.inc'; +@@ -55,6 +55,5 @@ + // the module passes an array where an exception is expected. Patch it with + // https://www.drupal.org/files/issues/2023-08-24/fast_404_3x-3194034-10.patch + // @see https://www.drupal.org/project/fast_404/issues/3194034 - // @phpstan-ignore-next-line fast404_preboot($settings); } diff --git a/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php b/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php index 40718a036..a1d4ad85e 100644 --- a/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php +++ b/.vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php @@ -1024,16 +1024,31 @@ protected function subtestAhoyRedis(): void { protected function subtestAhoyFast404(): void { $this->logStepStart(); - $this->logSubstep('Assert that the preboot error page is served for a missing asset'); // Drupal core serves a near-identical 404 page for the same extensions, // so the DOCTYPE from `settings.fast_404.php` is what tells the two apart. - $this->assertWebpageContains('/missing.png', '-//W3C//DTD XHTML+RDFa 1.0//EN', 'Error page from `settings.fast_404.php` should be served'); + $error_page = '-//W3C//DTD XHTML+RDFa 1.0//EN'; + $derivative = '/sites/default/files/styles/large/public/missing.jpg'; + + $this->logSubstep('Assert that the preboot error page is served for a missing asset'); + $this->assertWebpageContains('/missing.png', $error_page, 'Error page from `settings.fast_404.php` should be served'); $this->assertWebpageContains('/missing.png', 'The requested URL "/missing.png" was not found on this server.', 'Error page should report the request path resolved before Drupal bootstraps'); + $this->cmd('ahoy cli curl -- -sSL -o /dev/null -w "%{http_code}" http://nginx:8080/missing.png | grep -q 404', txt: 'Missing asset should be answered with a 404 status'); + + $this->logSubstep('Assert that a missing image derivative is served the error page'); + $this->assertWebpageContains($derivative, $error_page, 'Image derivatives should fall under the static file rules for anonymous users'); + $this->cmd('ahoy cli curl -- -sSL -o /dev/null -w "%{http_code}" http://nginx:8080' . $derivative . ' | grep -q 404', txt: 'Missing image derivative should be answered with a 404 status'); $this->logSubstep('Assert that a route served by Drupal is not intercepted'); - $this->assertWebpageNotContains('/robots.txt', '-//W3C//DTD XHTML+RDFa 1.0//EN', '`robots.txt` is served by a module, so the preboot handler must let it through'); + $this->assertWebpageNotContains('/robots.txt', $error_page, '`robots.txt` is served by a module, so the preboot handler must let it through'); $this->assertWebpageContains('/robots.txt', 'User-agent: *', '`robots.txt` should be served by Drupal'); + $this->logSubstep('Assert that a missing page without an extension is left to Drupal'); + $this->assertWebpageNotContains('/some-missing-page', $error_page, 'Path checking is disabled, so Drupal answers paths that carry no file extension'); + // The settings script only ever appears on a page Drupal itself rendered, + // so it separates a Drupal 404 from a web server one. + $this->assertWebpageContains('/some-missing-page', 'drupal-settings-json', 'Drupal should render the 404 page for a path that carries no file extension'); + $this->cmd('ahoy cli curl -- -sSL -o /dev/null -w "%{http_code}" http://nginx:8080/some-missing-page | grep -q 404', txt: 'Missing page should be answered with a 404 status'); + $this->logStepFinish(); } diff --git a/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/tests/phpunit/Drupal/EnvironmentSettingsTest.php index c53d3b713..b6c9c4e04 100644 --- a/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -335,15 +335,16 @@ public function testEnvironmentNoOverrides(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -453,15 +454,16 @@ public function testEnvironmentOverrides(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_SUT; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -533,15 +535,16 @@ public function testEnvironmentLocal(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -616,15 +619,16 @@ public function testEnvironmentLocalContainer(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_LOCAL; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -743,15 +747,16 @@ public function testEnvironmentCircleCi(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_CI; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -828,15 +833,16 @@ public function testEnvironmentGha(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_CI; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -909,15 +915,16 @@ public function testEnvironmentAcquiaDynamic(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -987,15 +994,16 @@ public function testEnvironmentAcquiaDev(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -1065,15 +1073,16 @@ public function testEnvironmentAcquiaStage(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_STAGE; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -1140,15 +1149,16 @@ public function testEnvironmentAcquiaProd(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_PROD; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -1220,15 +1230,16 @@ public function testEnvironmentAcquiaConfigPathOverride(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -1307,15 +1318,16 @@ public function testEnvironmentAcquiaConfigVcsDirectoryFallback(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -1392,15 +1404,16 @@ public function testEnvironmentLagoonPreview(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -1481,15 +1494,16 @@ public function testEnvironmentLagoonDev(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_DEV; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -1570,15 +1584,16 @@ public function testEnvironmentLagoonTest(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_STAGE; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 @@ -1657,15 +1672,16 @@ public function testEnvironmentLagoonProd(): void { $settings['entity_update_batch_size'] = 50; $settings['environment'] = self::ENVIRONMENT_PROD; // phpcs:ignore #;< MODULE_FAST_404 - $settings['fast404_allow_anon_imagecache'] = TRUE; + $settings['fast404_allow_anon_imagecache'] = FALSE; $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + $settings['fast404_path_check'] = FALSE; + $settings['fast404_respect_redirect'] = FALSE; + $settings['fast404_url_whitelisting'] = TRUE; $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; // phpcs:ignore #;> MODULE_FAST_404 diff --git a/tests/phpunit/Drupal/SwitchableSettingsTest.php b/tests/phpunit/Drupal/SwitchableSettingsTest.php index 12f7f3a41..ac18c74af 100644 --- a/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -284,8 +284,11 @@ public static function dataProviderFast404(): \Iterator { TRUE, [ 'fast404_exts' => '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i', - 'fast404_allow_anon_imagecache' => TRUE, - 'fast404_whitelist' => ['index.php', 'rss.xml', 'install.php', 'cron.php', 'update.php', 'xmlrpc.php'], + 'fast404_allow_anon_imagecache' => FALSE, + 'fast404_url_whitelisting' => TRUE, + 'fast404_whitelist' => ['index.php', 'rss.xml', 'cron.php', 'xmlrpc.php'], + 'fast404_path_check' => FALSE, + 'fast404_respect_redirect' => FALSE, 'fast404_html' => 'The requested URL "@path" was not found on this server.
', ], ]; @@ -295,7 +298,10 @@ public static function dataProviderFast404(): \Iterator { [ 'fast404_exts' => NULL, 'fast404_allow_anon_imagecache' => NULL, + 'fast404_url_whitelisting' => NULL, 'fast404_whitelist' => NULL, + 'fast404_path_check' => NULL, + 'fast404_respect_redirect' => NULL, 'fast404_html' => NULL, ], ]; diff --git a/web/sites/default/includes/modules/settings.fast_404.php b/web/sites/default/includes/modules/settings.fast_404.php index d5fcf8950..20312a409 100644 --- a/web/sites/default/includes/modules/settings.fast_404.php +++ b/web/sites/default/includes/modules/settings.fast_404.php @@ -8,18 +8,53 @@ declare(strict_types=1); if (file_exists($contrib_path . '/fast_404/fast404.inc')) { + // Disallowed extensions. Any extension set here will not be served by Drupal + // and will get a Fast 404. This does not affect actual files on the + // filesystem, as requests hit them before defaulting to a Drupal request. $settings['fast404_exts'] = '/^(?!\/robots)^(?!\/system\/files).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; - $settings['fast404_allow_anon_imagecache'] = TRUE; + + // Image derivative URLs fall under the same rules as any other static file. + // Anonymous requests no longer create derivatives, so the site cannot be + // taken down by hammering it with image style paths. + $settings['fast404_allow_anon_imagecache'] = FALSE; + + // Check requests against a whitelist before the extension list. Modules that + // serve their own PHP files need to be whitelisted below if they bootstrap + // Drupal. + $settings['fast404_url_whitelisting'] = TRUE; + + // Files and URLs allowed while URL whitelisting is enabled. $settings['fast404_whitelist'] = [ 'index.php', 'rss.xml', - 'install.php', 'cron.php', - 'update.php', 'xmlrpc.php', ]; + + // Check whether the requested path corresponds to a real page by consulting + // the router and the URL aliases. This finds 404s earlier at the cost of + // adding the lookup to regular page loads. The lookup queries the database + // before Drupal has connected to it, so every path other than the front page + // answers with a redirect to the installer. Enable it once the module is + // patched with + // https://www.drupal.org/files/issues/2022-10-05/fast_404-db_preboot_errors_d9.4-2961512-23.patch + // @see https://www.drupal.org/project/fast_404/issues/2961512 + $settings['fast404_path_check'] = FALSE; + + // The path check runs before the Redirect module, so it consults the + // redirect table to avoid answering a configured redirect with a 404. Enable + // it alongside the path check above. + $settings['fast404_respect_redirect'] = FALSE; + + // Body of the 404 response. The '@path' token is replaced with the path + // being requested relative to the executed script. $settings['fast404_html'] = 'The requested URL "@path" was not found on this server.
'; + include_once $contrib_path . '/fast_404/fast404.inc'; + // Each answered request logs a TypeError after the response is sent, because + // the module passes an array where an exception is expected. Patch it with + // https://www.drupal.org/files/issues/2023-08-24/fast_404_3x-3194034-10.patch + // @see https://www.drupal.org/project/fast_404/issues/3194034 // @phpstan-ignore-next-line fast404_preboot($settings); }