Page MenuHomePhabricator

D20794.id.diff
No OneTemporary

D20794.id.diff

diff --git a/src/applications/meta/engineextension/PhabricatorDatasourceURIEngineExtension.php b/src/applications/meta/engineextension/PhabricatorDatasourceURIEngineExtension.php
--- a/src/applications/meta/engineextension/PhabricatorDatasourceURIEngineExtension.php
+++ b/src/applications/meta/engineextension/PhabricatorDatasourceURIEngineExtension.php
@@ -26,7 +26,17 @@
->setProtocol(null)
->setPort(null);
- return phutil_string_cast($uri);
+ $uri = phutil_string_cast($uri);
+
+ // See T13412. If the URI was in the form "http://dev.example.com" with
+ // no trailing slash, there may be no path. Redirecting to the empty
+ // string is considered an error by safety checks during redirection,
+ // so treat this like the user entered the URI with a trailing slash.
+ if (!strlen($uri)) {
+ $uri = '/';
+ }
+
+ return $uri;
}
return null;

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 18, 9:50 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7709623
Default Alt Text
D20794.id.diff (930 B)

Event Timeline