Skip to content

Commit

Permalink
Docker: Convert hostname to lowercase to fix fatal error
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
iandunn and pkevan committed Sep 8, 2023
1 parent 5b04e30 commit 5ce4542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .docker/wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 5ce4542

Please sign in to comment.