Page MenuHomePhorge

D25555.1734619471.diff
No OneTemporary

D25555.1734619471.diff

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) {

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 14:44 (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1015096
Default Alt Text
D25555.1734619471.diff (964 B)

Event Timeline