From b2cb51f8ee90126963f2cefdc4513e6c4034120b Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Fri, 8 Sep 2023 11:08:15 -0700 Subject: [PATCH] Docker: Convert hostname to lowercase to fix fatal error Otherwise pentesters using `curl` with a hostname like `Events.wordpress.org` (not the uppercase) will clutter the logs with fatal errors because the Global Fonts mu-plugin isn't loaded. Regular browsers automatically convert the domain to lowercase before sending the request. Co-Authored-By: Paul Kevan --- .docker/wp-config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/wp-config.php b/.docker/wp-config.php index 5790f28138..78b557db69 100644 --- a/.docker/wp-config.php +++ b/.docker/wp-config.php @@ -43,7 +43,7 @@ const EVENTS_NETWORK_ID = 2; const EVENTS_ROOT_BLOG_ID = 47; -switch ( $_SERVER['HTTP_HOST'] ) { +switch ( strtolower( $_SERVER['HTTP_HOST'] ) ) { case 'events.wordpress.test': define( 'SITE_ID_CURRENT_SITE', EVENTS_NETWORK_ID ); define( 'BLOG_ID_CURRENT_SITE', EVENTS_ROOT_BLOG_ID );