diff --git a/src/infrastructure/env/PhabricatorEnv.php b/src/infrastructure/env/PhabricatorEnv.php --- a/src/infrastructure/env/PhabricatorEnv.php +++ b/src/infrastructure/env/PhabricatorEnv.php @@ -433,7 +433,7 @@ $host = $uri->getDomain(); if (!phutil_nonempty_string($host)) { - return false; + return true; } $host = phutil_utf8_strtolower($host); diff --git a/src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php b/src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php --- a/src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php +++ b/src/infrastructure/env/__tests__/PhabricatorEnvTestCase.php @@ -243,6 +243,12 @@ 'https://old.example.com/path/to/resource.png' => true, 'https://other.example.com/' => false, + + '/' => true, + '/self' => true, + '#self' => true, + '/#self' => true, + '/self/#self' => true, ); foreach ($map as $input => $expect) {