From b065fba502e5a7289caadf52a040fc1f94b3c097 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 20 Nov 2018 22:36:12 -0500 Subject: [PATCH] Revert "Use actual site root for webfinger discovery" This reverts commit 7161cb4ebefba6dc4696664d58298465f190bd71. --- includes/server/webfinger.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/includes/server/webfinger.php b/includes/server/webfinger.php index fffe108..3dc4fb3 100644 --- a/includes/server/webfinger.php +++ b/includes/server/webfinger.php @@ -41,15 +41,7 @@ function handle( $query ) { } $account_name = $matches[1]; $account_host = $matches[2]; - $parsed = parse_url( site_url() ); - $site_root = $parsed['host']; - if ( array_key_exists( 'port', $parsed ) && ! empty( $parsed['port'] ) ) { - $site_root = $site_root . ':' . $parsed['port']; - } - if ( array_key_exists( 'path', $parsed ) && ! empty( $parsed['path'] ) ) { - $site_root = $site_root . $parsed['path']; - } - if ( $account_host !== $site_root ) { + if ( $account_host !== $_SERVER['HTTP_HOST'] ) { header( 'HTTP/1.1 404 Not Found', true, 404 ); echo __( 'Resource not found', 'pterotype' ); exit;