Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2680722
D25555.1734619471.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
964 B
Referenced Files
None
Subscribers
None
D25555.1734619471.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D25555: isSelfURI: fix anchors and relative URIs (that are "self" indeed)
Attached
Detach File
Event Timeline
Log In to Comment